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

Query with join condition having date literal throws SemanticException.

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

    Description

      This semantic exception is thrown for the following query.
      SemanticException '2019-03-20' encountered with 0 children

      create table date_1 (key int, dd date);
      create table date_2 (key int, dd date);
      
      select d1.key, d2.dd from(
        select key, dd as start_dd, current_date as end_dd from date_1) d1
        join date_2 as d2 on d1.key = d2.key where d2.dd between start_dd and end_dd;
      

      When the WHERE condition below is commented out, the query completes successfully.
      where d2.dd between start_dd and end_dd
      ------------------------------------------------

      Attachments

        1. HIVE-21540.01.patch
          4 kB
          Sankar Hariappan

        Activity

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

          People

            sankarh Sankar Hariappan Assign to me
            sankarh Sankar Hariappan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 20m
              20m

              Slack

                Issue deployment