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

Return format differences between drill & odbc from interval date queries

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.8.0
    • Fix Version/s: Future
    • Component/s: Client - ODBC
    • Labels:
      None

      Description

      git.commit.id=ae2053d2a078a40033a140f2dfaeef802a5e8254

      The format of results from interval date queries is different between drill and odbc. Below are some examples.

      From drill:
      SELECT interval '10' day from basic limit 1;
      ------------

      EXPR$0

      ------------

      P10D

      ------------

      SELECT interval '12-11' year to month from basic limit 1;
      ------------

      EXPR$0

      ------------

      P12Y11M

      SELECT interval '1' year from basic limit 1;
      ------------

      EXPR$0

      ------------

      P1Y

      ------------

      SELECT interval '9' month from basic limit 1;
      ------------

      EXPR$0

      ------------

      P9M

      ------------

      From ODBC:
      SQL> SELECT interval '10' day from basic limit 1
      ---------------------------

      EXPR$0

      ---------------------------

      10 00:00:00.000000

      ---------------------------

      SQL> SELECT interval '12-11' year to month from basic limit 1
      --------------

      EXPR$0

      --------------

      12-11

      --------------

      SQL> SELECT interval '1' year from basic limit 1
      --------------

      EXPR$0

      --------------

      1-00

      --------------

      SQL> SELECT interval '9' month from basic limit 1
      --------------

      EXPR$0

      --------------

      0-09

      --------------

      We should have consistent output from the 2 sources. The result from ODBC seems easier to read.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              knguyen Krystal
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: