Kirill Tkalenko created CALCITE-7837:
----------------------------------------
Summary: ARRAY_MIN, ARRAY_MAX and SORT_ARRAY throw
ClassCastException for ROW elements
Key: CALCITE-7837
URL: https://issues.apache.org/jira/browse/CALCITE-7837
Project: Calcite
Issue Type: Bug
Reporter: Kirill Tkalenko
Assignee: Kirill Tkalenko
{{{}ARRAY_MIN{}}}, {{{}ARRAY_MAX{}}}, and {{SORT_ARRAY}} fail for arrays of
{{ROW}} values, including nested rows.
Example:
{{}}
{code:java}
SELECT ARRAY_MAX(ARRAY[ROW(1, 'Foo'), ROW(2, 'Bar')]);{code}
Expected: ROW(2, 'Bar').
Actual:
{{ClassCastException: class [Ljava.lang.Object; cannot be cast to class
java.lang.Comparable}}
These functions require Java {{Comparable}} elements, but {{ROW}} values are
represented as {{{}Object[]{}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)