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

[GitHub] [arrow-datafusion] berkaysynnada opened a new pull request, #6069: Remove temporal to kernels_arrow

berkaysynnada opened a new pull request, #6069:
URL: https://github.com/apache/arrow-datafusion/pull/6069

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #5704.
   
   # Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   Temporal arithmetic code will be moved to arrow-rs eventually. For this purpose, this PR is an intermediate step that facilitates the process (the same pattern used for other removals).
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   In datetime.rs, the `evaluate()` function calls the binary.rs function `resolve_temporal_op()` and `resolve_temporal_op_scalar()`, according to type of the second value, Array or Scalar. It can access the **add/sub_dyn...()** functions in kernels_arrow.rs (the functions that will be moved to arrow-rs deployed here until arrow-rs changes happen)
   
   # Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   Yes, with existing tests.
   
   # Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->


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


[GitHub] [arrow-datafusion] mustafasrepo merged pull request #6069: Remove temporal to kernels_arrow

Posted by "mustafasrepo (via GitHub)" <gi...@apache.org>.
mustafasrepo merged PR #6069:
URL: https://github.com/apache/arrow-datafusion/pull/6069


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


[GitHub] [arrow-datafusion] berkaysynnada commented on pull request #6069: Remove temporal to kernels_arrow

Posted by "berkaysynnada (via GitHub)" <gi...@apache.org>.
berkaysynnada commented on PR #6069:
URL: https://github.com/apache/arrow-datafusion/pull/6069#issuecomment-1516288532

   @alamb I hope it was in line with your plan to move the codes. If there are places you think would be better, I'd love to hear.


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


[GitHub] [arrow-datafusion] alamb commented on pull request #6069: Remove temporal to kernels_arrow

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6069:
URL: https://github.com/apache/arrow-datafusion/pull/6069#issuecomment-1518311545

   ![Screenshot 2023-04-21 at 4 36 43 PM](https://user-images.githubusercontent.com/490673/233730085-9733fa12-3f94-4bcd-80ba-3270ad9bf063.png)
   
   @berkaysynnada  can you please resolve the conflicts with this PR? I don't really understand the issue, but I suspect it will be straightforward to fix


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


[GitHub] [arrow-datafusion] viirya commented on a diff in pull request #6069: Remove temporal to kernels_arrow

Posted by "viirya (via GitHub)" <gi...@apache.org>.
viirya commented on code in PR #6069:
URL: https://github.com/apache/arrow-datafusion/pull/6069#discussion_r1174529356


##########
datafusion/physical-expr/src/expressions/datetime.rs:
##########
@@ -151,13 +143,18 @@ impl PhysicalExpr for DateTimeIntervalExpr {
                     operand_lhs.sub(&operand_rhs)?
                 }))
             }
-            (ColumnarValue::Array(array_lhs), ColumnarValue::Scalar(operand_rhs)) => {
-                evaluate_temporal_array(array_lhs, sign, &operand_rhs)
-            }
-
-            (ColumnarValue::Array(array_lhs), ColumnarValue::Array(array_rhs)) => {
-                evaluate_temporal_arrays(&array_lhs, sign, &array_rhs)
+            // This function evaluates temporal array vs scalar operations, such as timestamp - timestamp,
+            // interval + interval, timestamp + interval, and interval + timestamp. It takes two arrays as input
+            // and an integer sign representing the operation (+1 for addition and -1 for subtraction).

Review Comment:
   ```suggestion
               // interval + interval, timestamp + interval, and interval + timestamp. It takes one array and one scalar as input
               // and an integer sign representing the operation (+1 for addition and -1 for subtraction).
   ```



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