Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-2901

Hive union with NULL constant and string in same column returns all null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      select x from (select value as x from src union all select NULL as x from src)a;

      This query produces all nulls, where value is a string column.

      Notably,
      select x from (select key as x from src union all select NULL as x from src)a;
      where key is a string, but can be cast to a double, the query returns correct results.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                navis Navis
                Reporter:
                kevinwilfong Kevin Wilfong
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: