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

ASF GitHub Bot updated FLINK-40250:
-----------------------------------
    Labels: pull-request-available  (was: )

> 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
>
> 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)

Reply via email to