zhouqingqing / qpmodel

A Relational Optimizer and Executor
MIT License
64 stars 18 forks source link

Resolve2 #305

Closed pkommoju closed 3 years ago

pkommoju commented 3 years ago
Second iteration of new ordinal resolution framework.
Add helper data structures to maintain list of column references in the
order they appear without duplicates, and required output expressions
in the order they appear. Call children to set their outputs, given
the current node's outputs.

When the child returns, there is very little work to be done. At the
moment, there are situations, where we still have to search the output
expressions to set the ordinals of column references (filter is one of
them).

Future work will eliminate this search by having all expressions to be
references to the new object called ValueId, which in turn will point to
the actual expression and thus avoiding searching inside expression
trees.