Support to compare tuples in (equal) operator(s) #13419
Labels
complexity: no estimate
feature: sql: operators
leverage: low
How well this feature composes and how many use-cases it opens up
Problem Statement
Currently, CrateDB's comparison operators do not support to compare tuples.
Following query doesn't work:
SELECT 1 WHERE (1,2) = (1,2)
Possible Solutions
Comparing tuples with (equal) operator(s) is supported.
Considered Alternatives
This can be of course done by comparing each tuple value dedicated combined by an
AND
operator:SELECT 1 WHERE 1 = 1 AND 2 = 2
But when considering the usage inside a sub-query for example like this:
the only workaround is to:
a) repeat the sub-query in each comparison which may result in poor performance due to repeated execution (depends on the internal optimizer/implementation)
b) or re-using a CTE which may not result in repeated execution but may not be comfortable to use
The text was updated successfully, but these errors were encountered: