[
https://issues.apache.org/jira/browse/FLINK-40250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gustavo de Morais closed FLINK-40250.
-------------------------------------
Fix Version/s: 2.4.0
Resolution: Fixed
Fixed in master: 04bfaff82c4ded6837ac7126a4aa27dbd57d3303
> Non-comparable types in ORDER BY / GROUP BY throw
> UnsupportedOperationException instead of a clean ValidationException
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: FLINK-40250
> URL: https://issues.apache.org/jira/browse/FLINK-40250
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / API
> Affects Versions: 2.3.0
> Reporter: Gustavo de Morais
> Assignee: Gustavo de Morais
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.4.0
>
>
> Using a non-comparable type (MAP, MULTISET, VARIANT,
> TIMESTAMP_WITH_TIME_ZONE) as an ordering/grouping key throws a raw
> UnsupportedOperationException from comparator codegen instead of a
> user-facing clean and easy to digest ValidationException.
> Reproduce:
> SELECT COUNT(*) FROM t GROUP BY map_column;
> Now: GenerateUtils.generateCompare throws
> "UnsupportedOperationException: Type(MAP<...>) is not an orderable data
> type, ..."
> Expected: a ValidationException, e.g.
> "Type 'MAP<...>' cannot be used for comparisons, so it is not supported in
> ORDER BY, GROUP BY, DISTINCT, or as a join or window ordering key."
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)