[ https://issues.apache.org/jira/browse/DRILL-7781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17183366#comment-17183366 ]
ASF GitHub Bot commented on DRILL-7781: --------------------------------------- oleg-zinovev opened a new pull request #2098: URL: https://github.com/apache/drill/pull/2098 …culating the quarter # [DRILL-7781](https://issues.apache.org/jira/browse/DRILL-7781): PR Title ## Description |SQL|Expected|Actual| |---|---|---| |nearestDate('2019-03-01 00:00:00', 'quarter')|2019-01-01 00:00:00|2019-04-01 00:00:00| |nearestDate('2019-06-01 00:00:00', 'quarter')|2019-04-01 00:00:00|2019-07-01 00:00:00| |nearestDate('2019-09-01 00:00:00', 'quarter')|2019-07-01 00:00:00|2019-10-01 00:00:00| |nearestDate('2019-12-01 00:00:00', 'quarter')|2019-10-01 00:00:00|SYSTEM ERROR: DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 13| ## Testing unit test has been added ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > NearestDate function returns an incorrect result when calculating the quarter > ----------------------------------------------------------------------------- > > Key: DRILL-7781 > URL: https://issues.apache.org/jira/browse/DRILL-7781 > Project: Apache Drill > Issue Type: Bug > Affects Versions: 1.16.0, 1.17.0 > Reporter: Oleg Zinoviev > Priority: Major > > ||SQL||Expected||Actual|| > |nearestDate('2019-03-01 00:00:00', 'quarter')|2019-01-01 00:00:00|2019-04-01 > 00:00:00| > |nearestDate('2019-06-01 00:00:00', 'quarter')|2019-04-01 00:00:00|2019-07-01 > 00:00:00| > |nearestDate('2019-09-01 00:00:00', 'quarter')|2019-07-01 00:00:00|2019-10-01 > 00:00:00| > |nearestDate('2019-12-01 00:00:00', 'quarter')|2019-10-01 00:00:00|SYSTEM > ERROR: DateTimeException: Invalid value for MonthOfYear (valid values 1 - > 12): 13| -- This message was sent by Atlassian Jira (v8.3.4#803005)