You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Krystal (JIRA)" <ji...@apache.org> on 2015/11/10 19:57:10 UTC

[jira] [Created] (DRILL-4059) Using concat function against interval gives confusing/incorrect result

Krystal created DRILL-4059:
------------------------------

             Summary: Using concat function against interval gives confusing/incorrect result
                 Key: DRILL-4059
                 URL: https://issues.apache.org/jira/browse/DRILL-4059
             Project: Apache Drill
          Issue Type: Bug
          Components: Functions - Drill
            Reporter: Krystal


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  |
+-------------------------------+




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)