-
Notifications
You must be signed in to change notification settings - Fork 108
Labels
SQL compilerRelated to the SQL compilerRelated to the SQL compilerhigh priorityTask should be tackled first, added in the current sprint if necessaryTask should be tackled first, added in the current sprint if necessary
Description
Two indexes can be shared when they have the same keys and the same values and they are produced by indexing the same input data source. CSE should actually detect this pattern.
However, the case when the keys are the same, but the values are different is more interesting. In this case the two indexes can be unified by choosing a value which is a superset of both values.
So the optimization will need to:
- find map_index operators with a common source
- producing the same key
- and different values
- feeding into a subsequent join each
The optimization will rewrite the map_index operators to produce the same value, a superset of the fields of both, and it will rewrite the subsequent joins to use the correct fields of the values.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
SQL compilerRelated to the SQL compilerRelated to the SQL compilerhigh priorityTask should be tackled first, added in the current sprint if necessaryTask should be tackled first, added in the current sprint if necessary