[ 
https://issues.apache.org/jira/browse/CALCITE-6790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mihai Budiu resolved CALCITE-6790.
----------------------------------
    Fix Version/s: 1.39.0
       Resolution: Fixed

Fixed in 
https://github.com/apache/calcite/commit/f9cc84f35aeba0effd6654da8471d4bef9eaa925
Thank you for the fix [~illes], thank you for the review [~caicancai]

> Write LIMIT for fetch operations in Vertica
> -------------------------------------------
>
>                 Key: CALCITE-6790
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6790
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.38.0
>            Reporter: Illes S
>            Assignee: Illes S
>            Priority: Trivial
>              Labels: Vertica, dialect, pull-request-available
>             Fix For: 1.39.0
>
>
> Vertica does not support {{FETCH NEXT ? ROWS ONLY}} syntax:
> *SQL*
> {code:sql}
> SELECT * FROM dual LIMIT 1 {code}
> *actual*
> {code:sql}
> SELECT *
> FROM "dual"
> FETCH NEXT 1 ROWS ONLY
> {code}
> *expected*
> {code:sql}
> SELECT *
> FROM "dual"
> LIMIT 1
> {code}
> The fix seems to be adding this to 
> [VerticaSqlDialect.java|https://github.com/apache/calcite/blob/main/core/src/main/java/org/apache/calcite/sql/dialect/VerticaSqlDialect.java]:
> {code:java}
>     @Override
>     public void unparseOffsetFetch(SqlWriter writer, @Nullable SqlNode 
> offset, @Nullable SqlNode fetch) {
>         unparseFetchUsingLimit(writer, offset, fetch);
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to