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

union involving double column with a map join subquery will fail or give wrong results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.10.0
    • 0.10.0
    • Query Processor
    • None
    • Reviewed

    Description

      The following query fails:
      select * from (select cast(a.key as bigint) as key from src a join src b on a.key = b.key union all select cast(key as double) as key from src)a

      The following query gives wrong results:
      select * from (select cast(a.key as bigint) as key, cast(b.key as double) as value from src a join src b on a.key = b.key union all select cast(key as double) as key, cast(key as string) as value from src)a

      But the following query runs fine:
      select * from (select cast(a.key as bigint) as key from src a union all select cast(key as double) as key from src)a

      Attachments

        1. HIVE-3544.1.patch.txt
          643 kB
          Kevin Wilfong
        2. HIVE-3544.2.patch.txt
          643 kB
          Kevin Wilfong
        3. HIVE-3544.3.patch.txt
          644 kB
          Kevin Wilfong
        4. HIVE-3544.4.patch.txt
          81 kB
          Kevin Wilfong

        Issue Links

          Activity

            People

              kevinwilfong Kevin Wilfong
              kevinwilfong Kevin Wilfong
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: