Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-4160

Impala - result set is not sorted if ORDER BY is defined in query

    XMLWordPrintable

Details

    Description

      Query:

      SELECT g_1.StringNum AS c_0 FROM Source.SmallA AS g_1 WHERE g_1.IntKey <= 50 UNION ALL SELECT g_0.StringNum AS c_0 FROM Source.SmallB AS g_0 WHERE g_0.IntKey > 50 ORDER BY c_0
      

      Result: as you can see, nulls are not next to each other

      StringNum
      -24
      <null>
      -14
      -13
      -12
      -11
      -10
      -9
      -8
      <null>
      -6
      -5
      ...

      Expected result: this is result of simple query SELECT stringnum FROM source.smalla ORDER BY 1

      StringNum
      -1
      -10
      -11
      -12
      -13
      -14
      -15
      ...

      Attachments

        Activity

          People

            rhn-engineering-shawkins Steven Hawkins
            jdurani Juraj DurĂ¡ni (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: