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

Can't get the right column value in LogicalSort

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Not A Bug
    • 1.19.0
    • None
    • core
    • 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

              danny0405 Danny Chen
              yuqi yuqi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: