You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
selectsum(x)
filter (where z !=1)
keep (dense_rank first order by y)
from t
It currently doesn't parse:
Keyword 'SELECT' expected: [3:9] select sum(x)
filter (where z != 1)
keep ([*]dense_rank first order by y)
from t
So, let's get this to work as well. Once it works it should be emulated as follows:
selectsum(case when z <>1 then x end)
keep (dense_rank first order by case when z <>1 then y end nulls last)
from t
It currently produces this emulation, though, which is "wrong" (or let's say, less useful):
selectsum(case when z <>1 then x end)
keep (dense_rank first order by y)
from t
The FILTER should apply also to the KEEP clause.
This is a backwards incompatible change. I'm not 100% convinced we should implement it, yet. Specifically, because in jOOQ, the keepDenseRankFirst() clause is appended to the AggregateFunction first, before the filterWhere() clause, which hints at the current implementation being correct.
But at least it's documented now as a tempting change, which can be discussed.
The text was updated successfully, but these errors were encountered:
This hypothetical syntax should work with jOOQ:
It currently doesn't parse:
So, let's get this to work as well. Once it works it should be emulated as follows:
It currently produces this emulation, though, which is "wrong" (or let's say, less useful):
The
FILTER
should apply also to theKEEP
clause.This is a backwards incompatible change. I'm not 100% convinced we should implement it, yet. Specifically, because in jOOQ, the
keepDenseRankFirst()
clause is appended to theAggregateFunction
first, before thefilterWhere()
clause, which hints at the current implementation being correct.But at least it's documented now as a tempting change, which can be discussed.
The text was updated successfully, but these errors were encountered: