[ https://issues.apache.org/jira/browse/IGNITE-21162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir Steshin updated IGNITE-21162: -------------------------------------- Labels: ise (was: ) > Use table SQL hints > ------------------- > > Key: IGNITE-21162 > URL: https://issues.apache.org/jira/browse/IGNITE-21162 > Project: Ignite > Issue Type: Improvement > Reporter: Vladimir Steshin > Priority: Major > Labels: ise > > 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()_ . This would 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} > MIght be useful int sub-queries or when aliases are used. -- This message was sent by Atlassian Jira (v8.20.10#820010)