Vladimir Steshin created IGNITE-21162:
-----------------------------------------
Summary: Fix and use table SQL hints
Key: IGNITE-21162
URL: https://issues.apache.org/jira/browse/IGNITE-21162
Project: Ignite
Issue Type: Improvement
Reporter: Vladimir Steshin
Calcite parses and creates hints for 2 SQL nodes:
1) For SqlKind.SELECT в SqlToRelConverter.convertQuery() /
SqlToRelConverter.convertSelectImpl()
2) For SqlKind.TABLE_REF in SqlToRelConverter.convertFrom() . Here a hint comes
directly to a table / table scan
Currently, we skip #2 in _IgniteTable.toRel()_ not using
_RelOptTable.ToRelContext.getTableHints()_ .But this woul allow to set hints
more precisely:
{code:sql}
SELECT T1.V1, T2.V2 FROM TBL1 T1 JOIN TBL2 /*+ FORCE_INDEX(TBL2_IDX2) */ T2 on
T1.V3=T2.V3 and T1.V2=T2.V2 WHERE T2.V1 = ?;
{code}
or
{code:sql}
SELECT T1.V1, T2.V2 FROM TBL1 T1 JOIN TBL2 /*+ MERGE_JOIN */ T2 on T1.V3=T2.V3
and T1.V2=T2.V2 WHERE T2.V1 = ?;
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)