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

RelToSqlConverter has an error using ordinal for ORDER BY

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • 1.34.0
    • 1.35.0
    • core

    Description

       For example:
      Query SQL is 

       select a from table order by coalesce(a,b)

      When we convert this sql to relNode and convert it back to SQL by RelToConverter, the result is:

      select a from table order by 2

      But this sql syntax is wrong because there is no ordinal 2

      Attachments

        1. image-2023-04-19-12-26-32-719.png
          258 kB
          luoping.zhang

        Issue Links

          Activity

            People

              luoping.zhang luoping.zhang
              luoping.zhang luoping.zhang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m