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

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5643: Support `date_bin` with 2 arguments

alamb commented on code in PR #5643:
URL: https://github.com/apache/arrow-datafusion/pull/5643#discussion_r1142135409


##########
datafusion/core/tests/sqllogictests/test_files/timestamps.slt:
##########
@@ -88,6 +88,12 @@ SELECT DATE_BIN('15 minutes', '2022-08-03 14:38:50Z', '1970-01-01T00:00:00Z')
 ----
 2022-08-03T14:30:00
 
+# Call in two arguments

Review Comment:
   ```suggestion
   # Call in two arguments (should be the same as the above query)
   ```



##########
datafusion/physical-expr/src/datetime_expressions.rs:
##########
@@ -783,19 +788,11 @@ mod tests {
         ]);
         assert!(res.is_ok());

Review Comment:
   We could verify using a query like
   
   
   ```sql
   SELECT 
     DATE_BIN('15 minutes', '2022-08-03 14:38:50Z', '1970-01-01T00:00:00Z') = 
     DATE_BIN('15 minutes', '2022-08-03 14:38:50Z')
   ```
   
   And ensure it is true



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