[ https://issues.apache.org/jira/browse/DRILL-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16141634#comment-16141634 ]
ASF GitHub Bot commented on DRILL-1051: --------------------------------------- Github user arina-ielchiieva commented on the issue: https://github.com/apache/drill/pull/915 Two functional unit tests are failing after the changes: ``` /root/drillAutomation/drill-test-framework/framework/resources/Functional/datetime/datetime189.q Query: select min(cast(c_timestamp as timestamp) + interval '1 2:30:45.100' day to second) from basic Expected number of rows: 1 Actual number of rows from Drill: 1 Number of matching rows: 0 Number of rows missing: 1 Number of rows unexpected: 1 These rows are not expected (first 10): 0097-02-17 20:02:46.1 /root/drillAutomation/drill-test-framework/framework/resources/Functional/datetime/datetime201.q Query: select c_timestamp + c_interval_year from `interval_data.parquet` Expected number of rows: 9 Actual number of rows from Drill: 9 Number of matching rows: 8 Number of rows missing: 1 Number of rows unexpected: 1 These rows are not expected (first 10): 1862-07-30 08:03:11.0 These rows are missing (first 10): 1862-07-30 07:56:09.0 (1 time(s)) ``` It might be that tests should be corrected. @vdiravka could you please check? > Casting timestamp as date gives wrong result for dates earlier than 1883 > ------------------------------------------------------------------------ > > Key: DRILL-1051 > URL: https://issues.apache.org/jira/browse/DRILL-1051 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill > Reporter: Chun Chang > Assignee: Vitalii Diravka > Priority: Minor > Labels: ready-to-commit > Fix For: 1.12.0 > > > #Wed Jun 18 10:27:23 PDT 2014 > git.commit.id.abbrev=894037a > It appears casting dates earlier than year 1797 gives wrong result: > 0: jdbc:drill:schema=dfs> select cast(c_timestamp as varchar(20)), > cast(c_timestamp as date) from data where c_row <> 12; > +------------+------------+ > | EXPR$0 | EXPR$1 | > +------------+------------+ > | 1997-01-02 03:04:05 | 1997-01-02 | > | 1997-01-02 00:00:00 | 1997-01-02 | > | 2001-09-22 18:19:20 | 2001-09-22 | > | 1997-02-10 17:32:01 | 1997-02-10 | > | 1997-02-10 17:32:00 | 1997-02-10 | > | 1997-02-11 17:32:01 | 1997-02-11 | > | 1997-02-12 17:32:01 | 1997-02-12 | > | 1997-02-13 17:32:01 | 1997-02-13 | > | 1997-02-14 17:32:01 | 1997-02-14 | > | 1997-02-15 17:32:01 | 1997-02-15 | > | 1997-02-16 17:32:01 | 1997-02-16 | > | 0097-02-16 17:32:01 | 0097-02-17 | > | 0597-02-16 17:32:01 | 0597-02-13 | > | 1097-02-16 17:32:01 | 1097-02-09 | > | 1697-02-16 17:32:01 | 1697-02-15 | > | 1797-02-16 17:32:01 | 1797-02-15 | > | 1897-02-16 17:32:01 | 1897-02-16 | > | 1997-02-16 17:32:01 | 1997-02-16 | > | 2097-02-16 17:32:01 | 2097-02-16 | > | 1996-02-28 17:32:01 | 1996-02-28 | > | 1996-02-29 17:32:01 | 1996-02-29 | > | 1996-03-01 17:32:01 | 1996-03-01 | > +------------+------------+ > 22 rows selected (0.201 seconds) -- This message was sent by Atlassian JIRA (v6.4.14#64029)