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/05/03 11:45:47 UTC
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #6196: feat: allow scalars to appear as the LHS arg in arithmetic operations on temporal values
alamb commented on code in PR #6196:
URL: https://github.com/apache/arrow-datafusion/pull/6196#discussion_r1183530222
##########
datafusion/physical-expr/src/expressions/datetime.rs:
##########
@@ -772,4 +778,73 @@ mod tests {
Ok(())
}
+
+ #[test]
+ fn test_subtract_array_from_scalar() -> Result<()> {
Review Comment:
This is a neat test but I think we may be able to write it more concisely and get better end to end coverage by using sqllogictest. I will explain how to do that in the review comments
##########
datafusion/physical-expr/src/expressions/datetime.rs:
##########
@@ -120,16 +120,21 @@ impl PhysicalExpr for DateTimeIntervalExpr {
(ColumnarValue::Array(array_lhs), ColumnarValue::Scalar(array_rhs)) => {
resolve_temporal_op_scalar(&array_lhs, sign, &array_rhs)
}
+ // This function evaluates operations between a scalar value and an array of temporal
Review Comment:
👍
--
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