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

Hive Union Type Mismatch

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0, 1.3.0
    • 2.0.0
    • None
    • None

    Description

      In Hive for union right most type wins out for most primitive types during plan gen. However when union op gets initialized the type gets switched.

      This could result in bad data & type exceptions.

      This happens only in non cbo mode.
      In CBO mode, Hive would add explicit type casts that would prevent such type issues.

      Sample Query:
      select cd/sum(cd) over() from(select cd from u1 union all select cd from u2 union all select cd from u3)u4;

      Attachments

        1. HIVE-11919.2.patch
          6 kB
          Laljo John Pullokkaran
        2. HIVE-11919.1.patch
          0.8 kB
          Laljo John Pullokkaran

        Issue Links

          Activity

            People

              jpullokkaran Laljo John Pullokkaran
              jpullokkaran Laljo John Pullokkaran
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: