Closed szarnyasg closed 7 years ago
This could be done using a multi-pass algorithm.
Input: relational algebra container with schema inferencer already executed. The relational algebra tree has its root node (output) at the top and its leaves (inputs) at the bottom.
Let's if unary/binary operators have effect (towards the root of the tree) or requirements (towards leaf nodes).
Operator | Has effect :arrow_up: | Has requirements :arrow_down: |
---|---|---|
Unary nodes | ||
projection | x | x |
selection | - | x |
duplicate elimination | - | - |
grouping | x | x |
sorting | - | x |
top | - | - |
expand* | - | - |
unwind | - | x |
all-different | - | - |
Binary nodes | ||
union | - | - |
natural join | x | - |
left outer join | x | - |
antijoin | x | - |
getDetailedSchema.length
does the job perfectly)
Query plans should implement tuple semantics, i.e. instead of using attribute names, they should use tuples and indices. This is required by ire.