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

Using concat function against interval gives confusing/incorrect result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Functions - Drill

    Description

      The following queries return confusing result with the extra 0 months/years/days.:
      select concat(interval '5' year, interval '6' month) from basic limit 1;
      -------------------------------------

      EXPR$0

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

      5 years 0 months 0 years 6 months

      -------------------------------------
      1 row selected (0.458 seconds)
      0: jdbc:drill:zk=10.10.100.113:5181,10.10.100> select concat(interval '5' day, interval '6' hour) from basic limit 1;
      -------------------------------

      EXPR$0

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

      5 days 0:0:0.00 days 6:0:0.0

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

      The following query returns incorrect result:
      select concat(interval '5' minute, interval '10' second) from basic limit 1;
      -------------------------------

      EXPR$0

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

      0 days 0:5:0.00 days 0:5:0.0

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            knguyen Krystal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: