You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/08 04:05:19 UTC

[GitHub] [arrow-rs] Ted-Jiang opened a new pull request, #2849: [feat] Add pub api for checking column index is sorted.

Ted-Jiang opened a new pull request, #2849:
URL: https://github.com/apache/arrow-rs/pull/2849

   # Which issue does this PR close?
   
   
   Closes #2848.
   
   # 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 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 `breaking 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-rs] Ted-Jiang commented on pull request #2849: [feat] Add pub api for checking column index is sorted.

Posted by GitBox <gi...@apache.org>.
Ted-Jiang commented on PR #2849:
URL: https://github.com/apache/arrow-rs/pull/2849#issuecomment-1272238653

   @tustvold seems long time no contribution 😂


-- 
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-rs] tustvold commented on a diff in pull request #2849: [feat] Add pub api for checking column index is sorted.

Posted by GitBox <gi...@apache.org>.
tustvold commented on code in PR #2849:
URL: https://github.com/apache/arrow-rs/pull/2849#discussion_r990623017


##########
parquet/src/file/page_index/index.rs:
##########
@@ -63,6 +63,44 @@ pub enum Index {
     FIXED_LEN_BYTE_ARRAY(ByteArrayIndex),
 }
 
+impl Index {
+    /// Return min/max elements inside ColumnIndex are ordered or not.
+    pub fn is_sorted(&self) -> bool {
+        match self {
+            Index::NONE => false,
+            Index::BOOLEAN(x) => check_boundary_is_ordered(&x.boundary_order),
+            Index::INT32(x) => check_boundary_is_ordered(&x.boundary_order),
+            Index::INT64(x) => check_boundary_is_ordered(&x.boundary_order),
+            Index::INT96(x) => check_boundary_is_ordered(&x.boundary_order),
+            Index::FLOAT(x) => check_boundary_is_ordered(&x.boundary_order),
+            Index::DOUBLE(x) => check_boundary_is_ordered(&x.boundary_order),
+            Index::BYTE_ARRAY(x) | Index::FIXED_LEN_BYTE_ARRAY(x) => {
+                check_boundary_is_ordered(&x.boundary_order)
+            }
+        }
+    }
+
+    /// Get boundary_order of this page index.
+    pub fn get_boundary_order(&self) -> Option<BoundaryOrder> {
+        match self {
+            Index::NONE => None,

Review Comment:
   The explicit coding of NONE is kind of unfortunate, but that ship has probably sailed 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-rs] ursabot commented on pull request #2849: [feat] Add pub api for checking column index is sorted.

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #2849:
URL: https://github.com/apache/arrow-rs/pull/2849#issuecomment-1272962175

   Benchmark runs are scheduled for baseline = 2ae23093c3f7edc278fe6daf57daf167c430143b and contender = c3aac93454c67b7b1b2ee38cd33aa93c1a8e568e. c3aac93454c67b7b1b2ee38cd33aa93c1a8e568e 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-rs-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/a67817a0a5964882976c9d4d8f7179f0...1543d8346d3a40c9a3d54498ba97a31f/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/f0a3bc1b62294dd5b162bfb4da798457...6fc71ae9256c4670871443f397739a7d/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/3cad961ecaea4ed0b5efe5fa1f0156f6...e42ff667be22491f9f1b72cdf9023783/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/b1c4275c2c404a4d9d02276aaba40b65...8acaf9d6fd0b4cdd8f673cdda3059f6c/)
   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-rs] tustvold commented on a diff in pull request #2849: [feat] Add pub api for checking column index is sorted.

Posted by GitBox <gi...@apache.org>.
tustvold commented on code in PR #2849:
URL: https://github.com/apache/arrow-rs/pull/2849#discussion_r990615978


##########
parquet/src/file/page_index/index.rs:
##########
@@ -63,6 +64,29 @@ pub enum Index {
     FIXED_LEN_BYTE_ARRAY(ByteArrayIndex),
 }
 
+impl Index {
+    /// Return min/max elements inside ColumnIndex are ordered or not.
+    pub fn is_sorted(&self) -> bool {
+        match self {

Review Comment:
   Perhaps something for a follow up, but I wonder if we could add an accessor for boundary_order on Index, as it appears to be the same type for all variants. 



-- 
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-rs] tustvold commented on a diff in pull request #2849: [feat] Add pub api for checking column index is sorted.

Posted by GitBox <gi...@apache.org>.
tustvold commented on code in PR #2849:
URL: https://github.com/apache/arrow-rs/pull/2849#discussion_r990622796


##########
parquet/src/file/page_index/index.rs:
##########
@@ -63,6 +64,29 @@ pub enum Index {
     FIXED_LEN_BYTE_ARRAY(ByteArrayIndex),
 }
 
+impl Index {
+    /// Return min/max elements inside ColumnIndex are ordered or not.
+    pub fn is_sorted(&self) -> bool {
+        match self {

Review Comment:
   This could now be simplified to
   
   ```
   // 0:UNORDERED, 1:ASCENDING ,2:DESCENDING,
       self.get_boundary_order().0 > (BoundaryOrder::UNORDERED.0)
   ```



-- 
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-rs] Ted-Jiang commented on a diff in pull request #2849: [feat] Add pub api for checking column index is sorted.

Posted by GitBox <gi...@apache.org>.
Ted-Jiang commented on code in PR #2849:
URL: https://github.com/apache/arrow-rs/pull/2849#discussion_r990618990


##########
parquet/src/file/page_index/index.rs:
##########
@@ -63,6 +64,29 @@ pub enum Index {
     FIXED_LEN_BYTE_ARRAY(ByteArrayIndex),
 }
 
+impl Index {
+    /// Return min/max elements inside ColumnIndex are ordered or not.
+    pub fn is_sorted(&self) -> bool {
+        match self {

Review Comment:
   @tustvold still need approve Ci



-- 
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-rs] Ted-Jiang commented on a diff in pull request #2849: [feat] Add pub api for checking column index is sorted.

Posted by GitBox <gi...@apache.org>.
Ted-Jiang commented on code in PR #2849:
URL: https://github.com/apache/arrow-rs/pull/2849#discussion_r990641999


##########
parquet/src/file/page_index/index.rs:
##########
@@ -63,6 +64,29 @@ pub enum Index {
     FIXED_LEN_BYTE_ARRAY(ByteArrayIndex),
 }
 
+impl Index {
+    /// Return min/max elements inside ColumnIndex are ordered or not.
+    pub fn is_sorted(&self) -> bool {
+        match self {

Review Comment:
   @tustvold  yes 



-- 
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-rs] Ted-Jiang commented on a diff in pull request #2849: [feat] Add pub api for checking column index is sorted.

Posted by GitBox <gi...@apache.org>.
Ted-Jiang commented on code in PR #2849:
URL: https://github.com/apache/arrow-rs/pull/2849#discussion_r990641999


##########
parquet/src/file/page_index/index.rs:
##########
@@ -63,6 +64,29 @@ pub enum Index {
     FIXED_LEN_BYTE_ARRAY(ByteArrayIndex),
 }
 
+impl Index {
+    /// Return min/max elements inside ColumnIndex are ordered or not.
+    pub fn is_sorted(&self) -> bool {
+        match self {

Review Comment:
   yes



-- 
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-rs] tustvold merged pull request #2849: [feat] Add pub api for checking column index is sorted.

Posted by GitBox <gi...@apache.org>.
tustvold merged PR #2849:
URL: https://github.com/apache/arrow-rs/pull/2849


-- 
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-rs] Ted-Jiang commented on a diff in pull request #2849: [feat] Add pub api for checking column index is sorted.

Posted by GitBox <gi...@apache.org>.
Ted-Jiang commented on code in PR #2849:
URL: https://github.com/apache/arrow-rs/pull/2849#discussion_r990618580


##########
parquet/src/file/page_index/index.rs:
##########
@@ -63,6 +64,29 @@ pub enum Index {
     FIXED_LEN_BYTE_ARRAY(ByteArrayIndex),
 }
 
+impl Index {
+    /// Return min/max elements inside ColumnIndex are ordered or not.
+    pub fn is_sorted(&self) -> bool {
+        match self {

Review Comment:
   Reasonable!



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