[ 
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 stale-minor  (was: 
auto-deprioritized-major)

I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help 
the community manage its development. I see this issues has been marked as 
Minor but is unassigned and neither itself nor its Sub-Tasks have been updated 
for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is 
still Minor, please either assign yourself or give an update. Afterwards, 
please remove the label or in 7 days the issue will be deprioritized.


> 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, stale-minor
>
> 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.20.1#820001)

Reply via email to