Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-10508

incorrect evaluation of searched case expression

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.4.1, 1.5.0
    • Component/s: SQL
    • Labels:
      None

      Description

      The following case expression never evaluates to 'test1' when cdec is -1 or 10 as it will for Hive 0.13. Instead is returns 'other' for all rows.

      select rnum, cdec, case when cdec in ( -1,10,0.1 )  then 'test1' else 'other' end from tdec 
      
      create table  if not exists TDEC ( RNUM int , CDEC decimal(7, 2 )    )
      TERMINATED BY '\n' 
       STORED AS orc  ;
      
      
      0|\N
      1|-1.00
      2|0.00
      3|1.00
      4|0.10
      5|10.00
      

        Attachments

          Activity

            People

            • Assignee:
              joshrosen Josh Rosen
              Reporter:
              the6campbells N Campbell
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: