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

Support cast interval format with negative zero

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • Future
    • None

    Description

      Drill cannot identify negative sign before 0 in interval data format.

      For example,

      Query 1

      select cast(cast('P-0DT1H0M0S' as VARCHAR(32)) as interval second) from cp.`employee.json` limit 1;
      

      returns

      +------------+
      |   EXPR$0   |
      +------------+
      | PT3600S    |
      +------------+
      

      Query 2

      select cast(cast('PT-1H0M0S' as VARCHAR(32)) as interval second) from cp.`employee.json` limit 1;
      

      returns

      +------------+
      |   EXPR$0   |
      +------------+
      | PT-3600S   |
      +------------+
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            xiaom Xiaomeng Huang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: