You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "viirya (via GitHub)" <gi...@apache.org> on 2023/06/19 20:32:14 UTC

[GitHub] [arrow-datafusion] viirya commented on a diff in pull request #6723: Panic date trunc

viirya commented on code in PR #6723:
URL: https://github.com/apache/arrow-datafusion/pull/6723#discussion_r1234458349


##########
datafusion/core/tests/sqllogictests/test_files/timestamps.slt:
##########
@@ -837,6 +837,16 @@ SELECT DATE_TRUNC('YEAR', TIMESTAMP '2022-08-03 14:38:50Z');
 ----
 2022-01-01T00:00:00
 
+query P
+SELECT DATE_TRUNC('year', NULL);
+----
+1970-01-01T00:00:00

Review Comment:
   Hmm, I think @alamb added the expected behavior in #6701, which is `null should be returned` instead of this default value.
   
   
   



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

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org