[
https://issues.apache.org/jira/browse/CALCITE-7592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18086732#comment-18086732
]
Julian Hyde commented on CALCITE-7592:
--------------------------------------
Please fill out the description:
* give an example query.
* Describe which databases have this feature.
* And describe the validation rules for the expression. (“Select * from emp
fetch (deptno) rows” is clearly not valid.)
* I don’t think there’s any syntactic need for parentheses.
* I believe there is a request for bind variables in fetch. Can you link to
that case?
> Add expression support for FETCH
> --------------------------------
>
> Key: CALCITE-7592
> URL: https://issues.apache.org/jira/browse/CALCITE-7592
> Project: Calcite
> Issue Type: Improvement
> Reporter: Kirill Tkalenko
> Priority: Major
> Labels: pull-request-available
>
> I have not found any objections to the previously submitted proposal [Add
> expression for OFFSET ROWS and FETCH FIRST ROWS
> ONLY|https://lists.apache.org/thread/xgdgc8mgxh7rjclzblzy3lk5fcjyn1q4]; I
> propose implementing it for "FETCH" in this ticket.
> Brief description:
> It is proposed to add the ability to use arithmetic expressions and scalar
> function calls for "FETCH" only when enclosed in parentheses, by analogy with
> other DBMSs.
> Currently, it's
> {noformat}
> [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]{noformat}
> , but the proposal is to make it
> {noformat}
> [ FETCH { FIRST | NEXT } [ count | (expression) ] { ROW | ROWS } ONLY
> ]{noformat}
> .
--
This message was sent by Atlassian Jira
(v8.20.10#820010)