Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-4525

Query with BETWEEN clause on Date and Timestamp values fails with Validation Error

    XMLWordPrintableJSON

Details

    Description

      Query: (simplified variant of TPC-DS Query37)

      SELECT
             *
      FROM   
             date_dim
      WHERE   
             d_date BETWEEN Cast('1999-03-06' AS DATE) AND      (
                        Cast('1999-03-06' AS DATE) + INTERVAL '60' day)
      LIMIT 10;
      

      Error:

      Error: VALIDATION ERROR: From line 6, column 8 to line 7, column 64: Cannot apply 'BETWEEN ASYMMETRIC' to arguments of type '<ANY> BETWEEN ASYMMETRIC <DATE> AND <TIMESTAMP(0)>'. Supported form(s): '<COMPARABLE_TYPE> BETWEEN <COMPARABLE_TYPE> AND <COMPARABLE_TYPE>'
      SQL Query null
      [Error Id: 223fb37c-f561-4a37-9283-871dc6f4d6d0 on abhi2:31010] (state=,code=0)
      

      This is a regression from 1.6.0.

      Attachments

        Issue Links

          Activity

            People

              bohdan Bohdan Kazydub
              agirish Abhishek Girish
              Vova Vysotskyi Vova Vysotskyi
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: