[ 
https://issues.apache.org/jira/browse/FLINK-18003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flink Jira Bot updated FLINK-18003:
-----------------------------------
      Labels: auto-deprioritized-major  (was: stale-major)
    Priority: Minor  (was: Major)

This issue was labeled "stale-major" 7 ago and has not received any updates so 
it is being deprioritized. If this ticket is actually Major, please raise the 
priority and ask a committer to assign you the issue or revive the public 
discussion.


> Table hints support multi Options
> ---------------------------------
>
>                 Key: FLINK-18003
>                 URL: https://issues.apache.org/jira/browse/FLINK-18003
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / API
>    Affects Versions: 1.10.0
>            Reporter: hailong wang
>            Priority: Minor
>              Labels: auto-deprioritized-major
>
> For now, if we write mutil options in table hint, only the first takes 
> effect. For Example:
> {code:java}
> select * from t1/*+ OPTIONS(k5='v5', 'a.b.c'='fakeVal'), OPTIONS(k6='v6') */"
> {code}
> only k5='v5', 'a.b.c'='fakeVal' will be added to dynamic options.
> For in FlinkHints#getHintedOptions, we only find the first relHint.
> {code:java}
> public static Map<String, String> getHintedOptions(List<RelHint> tableHints) {
>    return tableHints.stream().filter(hint ->
>          hint.hintName.equalsIgnoreCase(HINT_NAME_OPTIONS))
>          .findFirst()
>          .map(hint -> hint.kvOptions)
>          .orElse(Collections.emptyMap());
> }{code}
> So I think we can  replace with:
> {code:java}
> public static Map<String, String> getHintedOptions(List<RelHint> tableHints) {
>    return tableHints.stream().filter(hint ->
>          hint.hintName.equalsIgnoreCase(HINT_NAME_OPTIONS))
>          .map(hint -> hint.kvOptions)
>          .map(Map::entrySet)
>          .flatMap(Set::stream)
>          .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
> }
> {code}
> By this, k6='v2' will take effect.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to