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

Cached expression feature broken in one case

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 0.14.0
    • 1.0.0
    • Query Processor
    • None

    Description

      Different query result depending on whether hive.cache.expr.evaluation is true or false. When true, no query results are produced (this is wrong).

      The q file:

      set hive.cache.expr.evaluation=true;
      
      CREATE TABLE cache_expr_repro (date_str STRING);
      LOAD DATA LOCAL INPATH '../../data/files/cache_expr_repro.txt' INTO TABLE cache_expr_repro;
      
      SELECT MONTH(date_str) AS `mon`, CAST((MONTH(date_str) - 1) / 3 + 1 AS int) AS `quarter`,   YEAR(date_str) AS `year` FROM cache_expr_repro WHERE ((CAST((MONTH(date_str) - 1) / 3 + 1 AS int) = 1) AND (YEAR(date_str) = 2015)) GROUP BY MONTH(date_str), CAST((MONTH(date_str) - 1) / 3 + 1 AS int),   YEAR(date_str) ;
      

      cache_expr_repro.txt

      2015-01-01 00:00:00
      2015-02-01 00:00:00
      2015-01-01 00:00:00
      2015-02-01 00:00:00
      2015-01-01 00:00:00
      2015-01-01 00:00:00
      2015-02-01 00:00:00
      2015-02-01 00:00:00
      2015-01-01 00:00:00
      2015-01-01 00:00:00
      

      Attachments

        1. HIVE-9278.1.patch.txt
          2 kB
          Navis Ryu

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            navis Navis Ryu Assign to me
            mmccline Matt McCline
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment