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

Can't get the right column value in LogicalSort

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Not A Bug
    • Affects Version/s: 1.19.0
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      Let's consider the sql:

      // Some comments here
      select 'hello', tag from b where text = '2' or text = '1' order by cast(text as int) + 1 asc , tag desc limit 1"
      

      And the Plan can be seen in the picture below

      We can't get the right column value of LogicalSort if sort condition is not the select column list
      Can anyone help to explain this problem if i'm wrong

        Attachments

        1. picture4.png
          132 kB
          yuqi
        2. picture2.png
          235 kB
          yuqi
        3. problem.png
          148 kB
          yuqi
        4. problem.png
          148 kB
          yuqi

          Issue Links

            Activity

              People

              • Assignee:
                danny0405 Danny Chan
                Reporter:
                yuqi yuqi
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: