Apache Drill
  1. Apache Drill
  2. DRILL-962

= or <> filter with date against timestamp columns fail

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Future
    • Component/s: Functions - Drill
    • Labels:
      None

      Description

      git.commit.id.abbrev=27a9c98
      git.build.time=10.06.2014 @ 21\:15\:17 PDT

      0: jdbc:drill:schema=dfs> select cast(name as varchar(30)), cast(create_time as timestamp) create_time from student where cast(create_time as timestamp) = date '2014-05-31';

      message: "Failure while parsing sql. < ValidationException:[ org.eigenbase.util.EigenbaseContextException: From line 1, column 97 to line 1, column 146 ] < EigenbaseContextException:[ From line 1, column 97 to line 1, column 146 ] < SqlValidatorException:[ Cannot apply '=' to arguments of type '<TIMESTAMP(0)> = <DATE>'. Supported form(s): '<COMPARABLE_TYPE> = <COMPARABLE_TYPE>' ]"
      ]

      The query run successfully in postgres and oracle. Looks like these 2 rdbms implicitly convert the date to timestamp.

        Activity

        Hide
        Mehant Baid added a comment -

        Supporting this comparison needs changes to Optiq, moving it to post beta.

        Show
        Mehant Baid added a comment - Supporting this comparison needs changes to Optiq, moving it to post beta.

          People

          • Assignee:
            Mehant Baid
            Reporter:
            Krystal
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development