Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
`= ANY(array)` support #2670
`= ANY(array)` support #2670
Conversation
The SQL Standard has is a syntax conflict between quantified comparison predicates and aggregate functions. This conflict is resolved in H2 via requirement to add parentheses around these functions.
First of all, you don't need to touch aggregate functions. They aren't related here, the mentioned syntax conflict is already resolved it H2 and there is nothing to change. Take a look on The another possible approach is to use the |
The
[A] is clear in H2, but [B] and [C] is hard to distinct in parsing because column type is unknown. In most databases, however, I may close this and submit another pr. |
In H2 other data types may be used as boolean values. All other constructions are PostgreSQL-specific. H2 supports only You can add Actually this problem is really even more complicated than I thought initially, because we can't determine data type of expression early if it is not a constant expression. It looks like |
this can prevent HeidiSQL error on unique or composite keys
Mentioned in #2480 .
Convert
value = ANY(array)
toARRAY_CONTAINS(array, value)
, and this feature can allow some PostgreSQL clients to get PK/UK frompg_constraint
, mentioned in #2450 .The conversion is in
optimize
stage, butSelect.setGroupQuery
is inparse
stage. If anyANY
function detected, skipsetGroupQuery
. ThensetGroupQuery
for real aggregateANY
before execute query.