Apache Drill
  1. Apache Drill
  2. DRILL-915

Extracting year from a time literal should fail

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: Functions - Drill
    • Labels:
      None

      Description

      When we try to extract year, month or day from time, drill seems to be returning 1970, 1, 1 respectively (1970-01-01 is a valid date). When we try to extract hour, minute, or second from any date literal, drill gives 0's.

      In both cases we should fail the query with a proper message. Postgres fails the query in both the cases.

      select extract (day from time '02:22:12') from basic;
      select extract (hour from date '2000-04-21') from basic;

        Activity

        Rahul Challapalli created issue -
        Mehant Baid made changes -
        Field Original Value New Value
        Fix Version/s Future [ 12326743 ]
        Jacques Nadeau made changes -
        Priority Major [ 3 ] Critical [ 2 ]
        Assignee Mehant Baid [ mehant ]
        Fix Version/s 1.0.0 [ 12325568 ]
        Fix Version/s Future [ 12326743 ]

          People

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

            Dates

            • Created:
              Updated:

              Development