[
https://issues.apache.org/jira/browse/CALCITE-6454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17862587#comment-17862587
]
Julian Hyde commented on CALCITE-6454:
--------------------------------------
Here's how to test ordering of arrays in ORDER BY. Apparently NULLS FIRST has
no effect.
{noformat}
with t (i, a) as (values (1, array [1, null, 3]), (2, array [1, 1, 4]))
select * from t order by a nulls first;
i a
=== ======
2 {1,1,4}
1 {1,NULL,3}
{noformat}
> Implement array comparison operators
> ------------------------------------
>
> Key: CALCITE-6454
> URL: https://issues.apache.org/jira/browse/CALCITE-6454
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Norman Jordan
> Priority: Major
>
> The comparison operators <, <=, >, >=, =, <> are not implemented for arrays.
> Here is an example query:
>
> {code:java}
> SELECT array[2, 2] > array[1, 1]; {code}
> [This
> page|https://popsql.com/learn-sql/postgresql/how-to-compare-arrays-in-postgresql]
> describes how the comparisons work in PostgreSQL.
>
> Check if the comparison operators for arrays exist in other DB engines.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)