[
https://issues.apache.org/jira/browse/FLINK-25699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17481888#comment-17481888
]
Timo Walther commented on FLINK-25699:
--------------------------------------
This is a tricky one:
* When comparing instances of {{Row}} the order is ignored.
* For {{RowData}} it depends on the code generated equalizer. Maybe you can
check this?
* For {{GenericMapData}} FLINK-17668 has fixed this shortcoming.
I would actually suggest to sort the keys after converting them to string for
the cast-to-string rule. Otherwise the result is always non-deterministic.
However, this is quite expensive. In general, comparing based on string is
always dangerous. We could also always just choose the value creation order
like in your example.
Happy to hear other opinions [~slinkydeveloper][~matriv]?
> Use HashMap for MAP value constructors
> --------------------------------------
>
> Key: FLINK-25699
> URL: https://issues.apache.org/jira/browse/FLINK-25699
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / Runtime
> Reporter: Timo Walther
> Assignee: Sergey Nuyanzin
> Priority: Major
>
> Currently, the usage of maps is inconsistent. It is not ensured that
> duplicate keys get eliminated. For CAST and output conversion this is solved.
> However, we should have a similar implementation in MAP value constructor
> like in CAST.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)