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

[GitHub] [arrow] felipecrv opened a new pull request, #34503: GH-20351: [C++] Kernel input type matcher for run-end encoded types

felipecrv opened a new pull request, #34503:
URL: https://github.com/apache/arrow/pull/34503

   ### Rationale for this change
   
   This is necessary to be able to specify dispatching of filters based on run-end encoded array (upcoming PR).
   
   ### Are these changes tested?
   
   TODO: tests coming in a moment.
   
   
   Closes #13971


-- 
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] felipecrv commented on pull request #34503: GH-20351: [C++] Kernel input type matcher for run-end encoded types

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

   @zeroshade 


-- 
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] felipecrv commented on a diff in pull request #34503: GH-20351: [C++] Kernel input type matcher for run-end encoded types

Posted by "felipecrv (via GitHub)" <gi...@apache.org>.
felipecrv commented on code in PR #34503:
URL: https://github.com/apache/arrow/pull/34503#discussion_r1134216296


##########
cpp/src/arrow/util/ree_util.h:
##########
@@ -209,18 +209,19 @@ class RunEndEncodedArraySpan {
   /// \brief Create an iterator from a logical position and its
   /// pre-computed physical offset into the run ends array
   ///
-  /// \param logical_pos is an index in the [0, length()) range
+  /// \param logical_pos is an index in the [0, length()] range
   /// \param physical_offset the pre-calculated PhysicalIndex(logical_pos)
   Iterator iterator(int64_t logical_pos, int64_t physical_offset) const {
     return Iterator{PrivateTag{}, *this, logical_pos, physical_offset};
   }
 
   /// \brief Create an iterator from a logical position
   ///
-  /// \param logical_pos is an index in the [0, length()) range
+  /// \param logical_pos is an index in the [0, length()] range
   Iterator iterator(int64_t logical_pos) const {
-    assert(logical_pos < length());
-    return iterator(logical_pos, PhysicalIndex(logical_pos));
+    return iterator(logical_pos, logical_pos < length()
+                                     ? PhysicalIndex(logical_pos)
+                                     : RunEndsArray(array_span).length);

Review Comment:
   I tried to use this class for something new and I realized this assert was too restrictive: it's not necessary for the correct working of the class.



-- 
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] zeroshade commented on a diff in pull request #34503: GH-20351: [C++] Kernel input type matcher for run-end encoded types

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade commented on code in PR #34503:
URL: https://github.com/apache/arrow/pull/34503#discussion_r1134159954


##########
cpp/src/arrow/util/ree_util.h:
##########
@@ -209,18 +209,19 @@ class RunEndEncodedArraySpan {
   /// \brief Create an iterator from a logical position and its
   /// pre-computed physical offset into the run ends array
   ///
-  /// \param logical_pos is an index in the [0, length()) range
+  /// \param logical_pos is an index in the [0, length()] range
   /// \param physical_offset the pre-calculated PhysicalIndex(logical_pos)
   Iterator iterator(int64_t logical_pos, int64_t physical_offset) const {
     return Iterator{PrivateTag{}, *this, logical_pos, physical_offset};
   }
 
   /// \brief Create an iterator from a logical position
   ///
-  /// \param logical_pos is an index in the [0, length()) range
+  /// \param logical_pos is an index in the [0, length()] range
   Iterator iterator(int64_t logical_pos) const {
-    assert(logical_pos < length());
-    return iterator(logical_pos, PhysicalIndex(logical_pos));
+    return iterator(logical_pos, logical_pos < length()
+                                     ? PhysicalIndex(logical_pos)
+                                     : RunEndsArray(array_span).length);

Review Comment:
   was this caught by a test?



-- 
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] felipecrv commented on a diff in pull request #34503: GH-20351: [C++] Kernel input type matcher for run-end encoded types

Posted by "felipecrv (via GitHub)" <gi...@apache.org>.
felipecrv commented on code in PR #34503:
URL: https://github.com/apache/arrow/pull/34503#discussion_r1134226256


##########
cpp/src/arrow/util/ree_util.h:
##########
@@ -209,18 +209,19 @@ class RunEndEncodedArraySpan {
   /// \brief Create an iterator from a logical position and its
   /// pre-computed physical offset into the run ends array
   ///
-  /// \param logical_pos is an index in the [0, length()) range
+  /// \param logical_pos is an index in the [0, length()] range
   /// \param physical_offset the pre-calculated PhysicalIndex(logical_pos)
   Iterator iterator(int64_t logical_pos, int64_t physical_offset) const {
     return Iterator{PrivateTag{}, *this, logical_pos, physical_offset};
   }
 
   /// \brief Create an iterator from a logical position
   ///
-  /// \param logical_pos is an index in the [0, length()) range
+  /// \param logical_pos is an index in the [0, length()] range
   Iterator iterator(int64_t logical_pos) const {
-    assert(logical_pos < length());
-    return iterator(logical_pos, PhysicalIndex(logical_pos));
+    return iterator(logical_pos, logical_pos < length()
+                                     ? PhysicalIndex(logical_pos)
+                                     : RunEndsArray(array_span).length);

Review Comment:
   `PhysicalIndex(logical_pos)` triggers an assert if a bad index is passed, so that's why I have the conditional now.



-- 
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] ursabot commented on pull request #34503: GH-20351: [C++] Kernel input type matcher for run-end encoded types

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

   Benchmark runs are scheduled for baseline = dbc1e90b58daa271cfdadffdaac957072e07cf82 and contender = 9c218abbe4d216145a7db42b8e9ca5f33115139a. 9c218abbe4d216145a7db42b8e9ca5f33115139a is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/9adc08b0d7464ce79d4f737e83fd7429...fcd698a4acd04cb6ad030ffa36edb82f/)
   [Finished :arrow_down:0.39% :arrow_up:0.06%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/121b62d360e84c9fa8f82231e32f03a2...fff4c1a17dc443d192fa506247c95b1d/)
   [Finished :arrow_down:0.51% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/9b119428ff314308ac078f95f3db32e2...83cb8d8733f746bdaa51b175aa41e673/)
   [Finished :arrow_down:0.75% :arrow_up:0.06%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/98d33342eb4242cabbf18a345db2e7d8...1b731ec3869f47fb88f4fec0cb41b0d1/)
   Buildkite builds:
   [Finished] [`9c218abb` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2516)
   [Finished] [`9c218abb` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/2546)
   [Finished] [`9c218abb` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2514)
   [Finished] [`9c218abb` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/2537)
   [Finished] [`dbc1e90b` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2515)
   [Finished] [`dbc1e90b` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/2545)
   [Finished] [`dbc1e90b` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2513)
   [Finished] [`dbc1e90b` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/2536)
   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] zeroshade merged pull request #34503: GH-20351: [C++] Kernel input type matcher for run-end encoded types

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


-- 
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] github-actions[bot] commented on pull request #34503: GH-20351: [C++] Kernel input type matcher for run-end encoded types

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #34503:
URL: https://github.com/apache/arrow/pull/34503#issuecomment-1460294256

   * Closes: #20351


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