Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6790

Write LIMIT for fetch operations in Vertica

    XMLWordPrintableJSON

Details

    Description

      Vertica does not support FETCH NEXT ? ROWS ONLY syntax:

      SQL

      SELECT * FROM dual LIMIT 1 

      actual

      SELECT *
      FROM "dual"
      FETCH NEXT 1 ROWS ONLY
      

      expected

      SELECT *
      FROM "dual"
      LIMIT 1
      

      The fix seems to be adding this to VerticaSqlDialect.java:

          @Override
          public void unparseOffsetFetch(SqlWriter writer, @Nullable SqlNode offset, @Nullable SqlNode fetch) {
              unparseFetchUsingLimit(writer, offset, fetch);
          }
      

      Attachments

        Issue Links

          Activity

            People

              illes Illes S
              illes Illes S
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: