[
https://issues.apache.org/jira/browse/FLINK-34034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jane Chan closed FLINK-34034.
-----------------------------
> When kv hint and list hint handle duplicate query hints, the results are
> different.
> -----------------------------------------------------------------------------------
>
> Key: FLINK-34034
> URL: https://issues.apache.org/jira/browse/FLINK-34034
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Affects Versions: 1.18.0, 1.19.0, 1.18.1
> Reporter: xuyang
> Assignee: Yunhong Zheng
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.19.0
>
>
> When there are duplicate keys in the kv hint, calcite will overwrite the
> previous value with the later value.
> {code:java}
> @TestTemplate
> def test(): Unit = {
> val sql =
> "SELECT /*+ LOOKUP('table'='D', 'retry-predicate'='lookup_miss',
> 'retry-strategy'='fixed_delay', 'fixed-delay'='10s','max-attempts'='3',
> 'max-attempts'='4') */ * FROM MyTable AS T JOIN LookupTable " +
> "FOR SYSTEM_TIME AS OF T.proctime AS D ON T.a = D.id"
> util.verifyExecPlan(sql)
> } {code}
> {code:java}
> Calc(select=[a, b, c, PROCTIME_MATERIALIZE(proctime) AS proctime, rowtime,
> id, name, age])
> +- LookupJoin(table=[default_catalog.default_database.LookupTable],
> joinType=[InnerJoin], lookup=[id=a], select=[a, b, c, proctime, rowtime, id,
> name, age], retry=[lookup_miss, FIXED_DELAY, 10000ms, 4])
> +- DataStreamScan(table=[[default_catalog, default_database, MyTable]],
> fields=[a, b, c, proctime, rowtime])
> {code}
> But when a list hint is duplicated (such as a join hint), we will choose the
> first one as the effective hint.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)