Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.21.0
-
Patch
Description
Taking the following SQL with hint for example: (Copying from `org.apache.calcite.test.SqlHintsConverterTest.testQueryHint `)
select /*+ properties(k1='v1', k2='v2'), index(ename), no_hash_join */ from emp e1 inner join dept d1 on e1.deptno = d1.deptno inner join emp e2 on e1.ename = e2.job
rel plan with hints should be something like the following according to the hint design doc:
LogicalProject(...)([PROPERTIES inheritPath:[] options:{K1=v1, K2=v2}],[INDEX inheritPath:[] options:[ENAME]],[NO_HASH_JOIN inheritPath:[]]) LogicalJoin(...) ([NO_HASH_JOIN inheritPath:[0]]) LogicalJoin(...) (NO_HASH_JOIN inheritPath:[0, 0]]) LogicalTableScan(...) ([PROPERTIES inheritPath:[0, 0, 0] options:{K1=v1, K2=v2}], [INDEX inheritPath:[0, 0, 0] options:[ENAME]]) LogicalTableScan(...) ([PROPERTIES inheritPath:[0, 0, 1] options:{K1=v1, K2=v2}], [INDEX inheritPath:[1, 0, 0] options:[ENAME]]) LogicalProject(...) LogicalTableScan(...) ([PROPERTIES inheritPath:[0, 1, 0] options:{K1=v1, K2=v2}], [INDEX inheritPath:[0, 1, 0] options:[ENAME]])
But the expected result of `SqlHintsConverterTest.testQueryHint` violates the intention of Hint design doc.
Attachments
Issue Links
- duplicates
-
CALCITE-3518 Use List instead of BitSet to keep inheritPath in RelHint
- Closed
- is related to
-
CALCITE-482 Implement SQL and planner hints
- Closed
- links to