Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.6.2
-
0
Description
create or replace function p1 (poby, pobyd, po, pl) {(SELECT d.* FROM [{"abc":10}, {"abc":8}, {"abc":6}, {"abc":1}] AS d ORDER BY d.[poby] pobyd OFFSET po LIMIT pl)};
|
Above one doesn't work. We only take $pobyd or $0
It is good accept like LIMIT/OFFSET
Due to parser conflicts, syntactically allow only the usage of function parameters as 'identifiers'.
https://github.com/couchbase/query/blob/70b6b24b400bb065e2a20ab7be47eb7541bdace8/parser/n1ql/n1ql.y#L2070
https://github.com/couchbase/query/blob/70b6b24b400bb065e2a20ab7be47eb7541bdace8/parser/n1ql/n1ql.y#L2092
Check if the direction and nulls position is a static expression and if not return an error.
Attachments
For Gerrit Dashboard: MB-61260 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
209227,9 | MB-61260: Support function parameters as ORDER BY direction and... | trinity | query | Status: MERGED | +2 | +1 |
209274,3 | MB-61260: [query-ee] Support function parameters as... | trinity | query-ee | Status: MERGED | +2 | +1 |
209485,2 | MB-61260: Add error description for E_ORDER_BY_VALIDATION_FAIL | master | query | Status: MERGED | +2 | +1 |