You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "vustef (via GitHub)" <gi...@apache.org> on 2025/11/18 10:21:29 UTC

[PR] Fix `RowNumberReader` [arrow-rs]

vustef opened a new pull request, #8863:
URL: https://github.com/apache/arrow-rs/pull/8863

   # Which issue does this PR close?
   
   No issue yet, please let me know if I should create one.
   
   # Rationale for this change
   
   https://github.com/apache/arrow-rs/pull/8715 introduced row numbers feature last week. However, it had a bug, which luckily for us @scovich pointed out soon after the merge. The issue is that the row numbers are produced in ordinal-based order of the row groups, instead of user-requested order of row groups. The former is wrong, and is being fixed here by switching to user-requested order.
   
   # What changes are included in this PR?
   
   Just fixing the bug as explained above, and adding test. Also addressing two small comments from post-merge review: https://github.com/apache/arrow-rs/pull/8715#pullrequestreview-3474400469
   
   # Are these changes tested?
   
   Yes.
   
   # Are there any user-facing changes?
   
   No, this wasn't released yet.
   


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


Re: [PR] Fix `RowNumberReader` when not all row groups are selected [arrow-rs]

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


##########
parquet/src/arrow/arrow_reader/mod.rs:
##########
@@ -625,12 +625,11 @@ impl ArrowReaderOptions {
     pub fn with_virtual_columns(self, virtual_columns: Vec<FieldRef>) -> Self {

Review Comment:
   Proposal: 
   - https://github.com/apache/arrow-rs/pull/8867



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


Re: [PR] Fix `RowNumberReader` [arrow-rs]

Posted by "etseidl (via GitHub)" <gi...@apache.org>.
etseidl commented on code in PR #8863:
URL: https://github.com/apache/arrow-rs/pull/8863#discussion_r2539323659


##########
parquet/src/arrow/arrow_reader/mod.rs:
##########
@@ -625,12 +625,11 @@ impl ArrowReaderOptions {
     pub fn with_virtual_columns(self, virtual_columns: Vec<FieldRef>) -> Self {

Review Comment:
   Sorry, I was upthumbing
   
   > Not having an ability to chain seems a bit degrading, though users can just use ? operator for that
   
   Meaning I'd be on board with `Result<Self>`.



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


Re: [PR] Fix `RowNumberReader` [arrow-rs]

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

   @scovich @alamb this is a bug fix on top off previous PR. I hope we can review it in time for 57.1.0 release candidate that was supposed to be carved out yesterday.


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


Re: [PR] Fix `RowNumberReader` when not all row groups are selected [arrow-rs]

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


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


Re: [PR] Fix `RowNumberReader` [arrow-rs]

Posted by "etseidl (via GitHub)" <gi...@apache.org>.
etseidl commented on code in PR #8863:
URL: https://github.com/apache/arrow-rs/pull/8863#discussion_r2539005243


##########
parquet/src/arrow/arrow_reader/mod.rs:
##########
@@ -625,12 +625,11 @@ impl ArrowReaderOptions {
     pub fn with_virtual_columns(self, virtual_columns: Vec<FieldRef>) -> Self {

Review Comment:
   I also made this comment in the original PR, but maybe we could change this to
   ```rust
   pub fn set_virtual_columns(&mut self, virtual_columns: Vec<FieldRef>) -> Result<()> {
   ```
   to avoid the panic. If we squeak this in before `57.1.0` ships it wouldn't be an API change.



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


Re: [PR] Fix `RowNumberReader` [arrow-rs]

Posted by "vustef (via GitHub)" <gi...@apache.org>.
vustef commented on code in PR #8863:
URL: https://github.com/apache/arrow-rs/pull/8863#discussion_r2539046954


##########
parquet/src/arrow/arrow_reader/mod.rs:
##########
@@ -625,12 +625,11 @@ impl ArrowReaderOptions {
     pub fn with_virtual_columns(self, virtual_columns: Vec<FieldRef>) -> Self {

Review Comment:
   Attaching a link for easier discussion: https://github.com/apache/arrow-rs/pull/8715#discussion_r2535407427
   
   Not having an ability to chain seems a bit degrading, though users can just use `?` operator for that (in which case it just panics, but that's fine, it's a choice).
   Having a proper builder would be nice, but it's then definitely an API change, and a bit less quick fix for the main thing that this PR is intended to solve.
   
   I'm fine with changing to `Result()`. Would you prefer that? Are others on board?



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


Re: [PR] Fix `RowNumberReader` [arrow-rs]

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


##########
parquet/src/arrow/arrow_reader/mod.rs:
##########
@@ -625,12 +625,11 @@ impl ArrowReaderOptions {
     pub fn with_virtual_columns(self, virtual_columns: Vec<FieldRef>) -> Self {

Review Comment:
   > I'm fine with changing to Result(). Would you prefer that? Are others on board?
   
   I agree that sounds better to me



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


Re: [PR] Fix `RowNumberReader` [arrow-rs]

Posted by "scovich (via GitHub)" <gi...@apache.org>.
scovich commented on code in PR #8863:
URL: https://github.com/apache/arrow-rs/pull/8863#discussion_r2539299557


##########
parquet/src/arrow/arrow_reader/mod.rs:
##########
@@ -625,12 +625,11 @@ impl ArrowReaderOptions {
     pub fn with_virtual_columns(self, virtual_columns: Vec<FieldRef>) -> Self {

Review Comment:
   Why is Result<Self> bad, sorry? Call it `try_with_xxx` if naming conventions are the problem?



##########
parquet/src/arrow/arrow_reader/mod.rs:
##########
@@ -625,12 +625,11 @@ impl ArrowReaderOptions {
     pub fn with_virtual_columns(self, virtual_columns: Vec<FieldRef>) -> Self {

Review Comment:
   Why is `Result<Self>` bad, sorry? Call it `try_with_xxx` if naming conventions are the problem?



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