Coder Social home page Coder Social logo

hzxa21 / peloton Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cmu-db/peloton

0.0 0.0 0.0 61.05 MB

The Self-Driving Database Management System

Home Page: http://pelotondb.org

License: Apache License 2.0

CMake 1.71% Python 1.05% Ruby 0.02% Shell 0.23% Java 0.70% PLpgSQL 0.09% C++ 95.43% C 0.70% Objective-C 0.07%
database

peloton's People

Contributors

abhishekjoshi2 avatar aelroby avatar allisonwang avatar amaliujia avatar angli-leon avatar apavlo avatar camellyx avatar chenboy avatar eric-haibin-lin avatar fzqneo avatar hanli32 avatar hzxa21 avatar jessesleeping avatar jiajunwang avatar jinwoongkim avatar linmagit avatar luochenumich avatar mattperron avatar mengranwo avatar mindbergh avatar pmenon avatar ranxian avatar runshenzhu avatar saifalharthi avatar seojungmin avatar sid1607 avatar viveksengupta avatar wangziqi2013 avatar yeoedward avatar yingjunwu avatar

Watchers

 avatar  avatar  avatar  avatar

peloton's Issues

Where Should We Put Join Predicates

  • Operator

    • Pros:
      1. Good for logical to physical transformation
    • Cons:
      1. Complicated logical transformation
      2. Need to extract multi-table predicates in the first stage and fill up the operator
  • Property

    • Pros:
      1. Good for logical transformation
    • Cons:
      1. May produce invalid plan (e.g. Hash Join for non-equii-join). Set a large cost?
      2. Extra enumerations? (Cascade framework already deal with this?)

Add support for DEFAULT in parser

When inserting a tuple with the number of values given smaller than the column count, the database gives an insertion failure and exits.

TODO List

  • Preserve order for the select elements in the query derived table
  • Hash and compare the inner SCAN correctly
  • Inner table has DISTINCT
  • Parser support for select * from A join B, C, nested where and nested select
  • Support explain
  • Should implement ResetState() in all executor
  • Subquery in having clause
  • Same table alias in subquery and outer query
  • Outer/Semi/Mark/Single Join
  • What-if api
  • Inject
  • Make child_prop_deriver to be an iterator

Doubts & thoughts

  • Do we really need to bind oids to tv_expr in the binder? Maybe resolving table and col name is enough?
  • Plan to implement subquery (no aggregation) in WHERE clause (OT - Outer Table)
    • EXISTS (SELECT * FROM A1, A2, ... An where [predicates])
      1. Break down predicates by conjunction, we get [p1, p2, ... pm].
      2. Find out one pi that has the form Ai.col = OT.col (without OR), pull it out as the join condition and transform EXISTS into INNER JOIN with DISTINCT in Ai.col in the right child. If there is not such pi, keep EXISTS which indicates that it should be done in a nested iteration way.
      3. Note that we also need to find out all pi that references the ancestor tables (tables that do not occur in the current level query) and pull them out into the upper level query.
    • OT.col in (SELECT expr FROM A1, A2, ... An where [predicates])
      1. Transform IN into INNER JOIN with DISTINCT in expr in the right child with join condition OT.col = expr.
      2. Break down predicates by conjunction, we get [p1, p2, ... pm].
      3. Find out all pi that references the ancestor tables (tables that do not occur in the current level query) and pull them out into the upper level query.
    • OT.col scalar_op (SELECT expr FROM A1, A2, ... An where [predicates])
      1. Transform it into INNER JOIN with join condition OT.col scalar_op expr. Note that we need to set a flag in the join to indicate that during execution we need to check whether the right child only produce one value for each left tuple.
      2. Break down predicates by conjunction, we get [p1, p2, ... pm].
      3. Find out all pi that references the ancestor tables (tables that do not occur in the current level query) and pull them out into the upper level query.
  • Optimizer refactor
    • Don't split logical transofmration and implementation
    • Only have sort property now (only introduce hash in to_plan operation)
    • Enforce property is done in OptimizeInput and OptimizeGroup skip enforce expression
  • Articles we need to explore:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.