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/02/06 08:06:17 UTC

[GitHub] [arrow-datafusion] viirya opened a new pull request, #5194: Support arithmetic operation on DictionaryArray

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

   # 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 #5193.
   
   # 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.  
   -->
   
   # 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.
   -->
   
   # 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)?
   -->
   
   # 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] alamb commented on a diff in pull request #5194: Support arithmetic operation on DictionaryArray

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


##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -418,6 +419,23 @@ macro_rules! binary_primitive_array_op {
     }};
 }
 
+/// Invoke a compute kernel on a pair of arrays
+/// The binary_primitive_array_op macro only evaluates for primitive types
+/// like integers and floats.
+macro_rules! binary_primitive_array_op_dyn {
+    ($LEFT:expr, $RIGHT:expr, $OP:ident) => {{
+        match $LEFT.data_type() {
+            DataType::Decimal128(_,_) => {
+                Ok(paste::expr! {[<$OP _decimal>]}(&$LEFT, &$RIGHT)?)
+                // Ok(Arc::new($OP(&$LEFT, &$RIGHT).map_err(|err| DataFusionError::ArrowError(err))?))

Review Comment:
   is this meant to be left commented out?



-- 
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] ursabot commented on pull request #5194: Support arithmetic operation on DictionaryArray

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

   Benchmark runs are scheduled for baseline = 04b13672cf80f1800fa5cdb81d890d8c1a8b2e72 and contender = 48732b4cb2c8e42fbe5be295429bbc465e5f5491. 48732b4cb2c8e42fbe5be295429bbc465e5f5491 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/88d64ea0521c48e09293da748e64f67f...a1cedb974586457f9e7fca6074d7b720/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/d132684a82c94721aa911c4b1ed93111...a6687127caa14466a423356879d466eb/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/f9fb5b01026f4354a4c5fd17a9ba015b...ea12f583edb04d8aaa49c0289d8f5bd7/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/67799a968c0747809ee6b681b5eb2010...4d632c3cd3454c4f9793d3e358e8220e/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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 #5194: Support arithmetic operation on DictionaryArray

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


##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -418,6 +419,23 @@ macro_rules! binary_primitive_array_op {
     }};
 }
 
+/// Invoke a compute kernel on a pair of arrays
+/// The binary_primitive_array_op macro only evaluates for primitive types
+/// like integers and floats.
+macro_rules! binary_primitive_array_op_dyn {
+    ($LEFT:expr, $RIGHT:expr, $OP:ident) => {{
+        match $LEFT.data_type() {
+            DataType::Decimal128(_,_) => {
+                Ok(paste::expr! {[<$OP _decimal>]}(&$LEFT, &$RIGHT)?)
+                // Ok(Arc::new($OP(&$LEFT, &$RIGHT).map_err(|err| DataFusionError::ArrowError(err))?))

Review Comment:
   Aha, forgot to clean it up. I will remove it along with test coverage in next commit. Thanks.



-- 
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] liukun4515 merged pull request #5194: Support arithmetic operation on DictionaryArray

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


-- 
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 #5194: Support arithmetic operation on DictionaryArray

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


##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -418,6 +419,23 @@ macro_rules! binary_primitive_array_op {
     }};
 }
 
+/// Invoke a compute kernel on a pair of arrays
+/// The binary_primitive_array_op macro only evaluates for primitive types
+/// like integers and floats.
+macro_rules! binary_primitive_array_op_dyn {
+    ($LEFT:expr, $RIGHT:expr, $OP:ident) => {{
+        match $LEFT.data_type() {
+            DataType::Decimal128(_,_) => {
+                Ok(paste::expr! {[<$OP _decimal>]}(&$LEFT, &$RIGHT)?)
+                // Ok(Arc::new($OP(&$LEFT, &$RIGHT).map_err(|err| DataFusionError::ArrowError(err))?))

Review Comment:
   Aha, forgot to clean it up. I will remove it along with adding test coverage in next commit. Thanks.



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