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

CAST string literal as INTERVAL MONTH/YEAR works inconsistently when selecting from a table with multiple rows

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.15.0
    • Fix Version/s: 1.15.0
    • Component/s: None
    • Labels:

      Description

      Casting string literal as INTERVAL MONTH or INTERVAL YEAR produces different values for each row (actually, with period of 4) when selecting data from table with more than one row.

      For example:

      
      0: jdbc:drill:zk=local> select cast('P314M' as interval month) from cp.`employee.json` limit 10;
      +--------------------------+
      |          EXPR$0          |
      +--------------------------+
      | 26 years 2 months        |
      | 81089877 years 5 months  |
      | 1714858 years 8 months   |
      | 6698 years 8 months      |
      | 26 years 2 months        |
      | 81089877 years 5 months  |
      | 1714858 years 8 months   |
      | 6698 years 8 months      |
      | 26 years 2 months        |
      | 81089877 years 5 months  |
      +--------------------------+
      10 rows selected (0.186 seconds)
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                KazydubB Bohdan Kazydub
                Reporter:
                KazydubB Bohdan Kazydub
                Reviewer:
                Volodymyr Vysotskyi
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: