[
https://issues.apache.org/jira/browse/CALCITE-3796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17036805#comment-17036805
]
Stamatis Zampetakis commented on CALCITE-3796:
----------------------------------------------
The SQL standard specifies the following regarding comparison on array types:
If the declared types of XV and YV are array types or distinct types whose
source types are array types and the cardinalities of XV and YV are N1 and N2,
respectively, then let X i , 1 (one) ≤ i ≤ N1, denote a <value expression>
whose value and declared type is that of the i-th element of XV and let Y i
denote a <value expression> whose value and declared type is that of the i-th
element of YV. The result of X <comp op> Y is determined as follows:
# X = Y is True if N1 = 0 (zero) and N2 = 0 (zero).
# X = Y is True if N1 = N2 and, for all i, X i = Y i is True.
# X = Y is False if and only if N1 ≠ N2 or NOT (X i = Y i ) is True, for some i.
# X <comp op> Y is Unknown if X <comp op> Y is neither True nor False.
It seems like that the behavior of <,<=,>,>= operators is undefined.
[~amaliujia] What are the above operations supposed to do in arrays? What does
other DBMS (e.g., Postgres) do?
> Support Array operator <, <=, >, >=
> -----------------------------------
>
> Key: CALCITE-3796
> URL: https://issues.apache.org/jira/browse/CALCITE-3796
> Project: Calcite
> Issue Type: Improvement
> Reporter: Rui Wang
> Assignee: Rui Wang
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Seems like Calcite has an =, <> support for array type. But it does not have
> <, <=, >, >= support.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)