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

[I] Parquet bool column SortOrder being UNSIGNED? [arrow-rs]

jp0317 opened a new issue, #6544:
URL: https://github.com/apache/arrow-rs/issues/6544

   **Describe the bug**
   Hi, please close if it's intended. It seems that SortOrder for bool is [UNSIGNED](https://github.com/jp0317/arrow-rs/blob/master/parquet/src/basic.rs#L625) in rust but [SIGNED](https://github.com/apache/arrow/blob/main/cpp/src/parquet/types.cc#L272-L277) in c++ implementation. Should the rust implementation also be SIGNED?
   
   **To Reproduce**
   n/a
   
   **Expected behavior**
   Consistency?
   
   **Additional context**
   n/a


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Parquet bool column SortOrder being UNSIGNED? [arrow-rs]

Posted by "jp0317 (via GitHub)" <gi...@apache.org>.
jp0317 commented on issue #6544:
URL: https://github.com/apache/arrow-rs/issues/6544#issuecomment-2407743905

   yeah, i got that. But wouldn't it be better if parquet-rs can read files written by other implementations?


-- 
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: [I] Parquet bool column SortOrder being UNSIGNED? [arrow-rs]

Posted by "jp0317 (via GitHub)" <gi...@apache.org>.
jp0317 commented on issue #6544:
URL: https://github.com/apache/arrow-rs/issues/6544#issuecomment-2407666239

   thanks @tustvold for the reply. Yeah that makes sense to me too, but both c++ and java implementation go with `SIGNED`, which can [affect if the column statistics are considered correct](https://github.com/apache/arrow/blob/main/cpp/src/parquet/metadata.cc#L1489). 


-- 
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: [I] Parquet bool column SortOrder being UNSIGNED? [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #6544:
URL: https://github.com/apache/arrow-rs/issues/6544#issuecomment-2414155680

   Maybe we can try to create a bug reproducer using a system like https://datafusion.apache.org/ or something else that uses the rust parquet reader (i.e. see if whatever statistics case we are concerned about can generate incorrect results)


-- 
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: [I] Parquet bool column SortOrder being UNSIGNED? [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #6544:
URL: https://github.com/apache/arrow-rs/issues/6544#issuecomment-2407755664

   We faithfully reproduce the statistics as written within the file, one could raise the prospect of adding similar validity checking, perhaps you might file a separate issue for this if there isn't one already. However, as for the topic of this issue, perhaps you could provider a reproducer of the actual issue you are running into? AFAICT we are writing unsigned, which the type objectively is, and some other implementations choose to write signed, likely for backwards compatibility, but I can't see what issue this could cause.


-- 
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: [I] Parquet bool column SortOrder being UNSIGNED? [arrow-rs]

Posted by "jp0317 (via GitHub)" <gi...@apache.org>.
jp0317 commented on issue #6544:
URL: https://github.com/apache/arrow-rs/issues/6544#issuecomment-2407764286

   Thanks for the reply! I think a potential issue would be affecting can we  use statistics to avoid unnecessary reading, e.g., pruning data based on the min/max. If  parquet-rs cannot identify invalid statistics, then  the user won't be able to tell if the statistics are trustable or would have risk of causing incorrect results.


-- 
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: [I] Parquet bool column SortOrder being UNSIGNED? [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #6544:
URL: https://github.com/apache/arrow-rs/issues/6544#issuecomment-2406943856

   Given a boolean doesn't have a sign, I would have expected it to be unsigned


-- 
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: [I] Parquet bool column SortOrder being UNSIGNED? [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #6544:
URL: https://github.com/apache/arrow-rs/issues/6544#issuecomment-2407676621

   That is because older versions of those libraries used to write invalid statistics, see a few lines earlier where it checks the parquet version - https://github.com/apache/arrow/blob/main/cpp/src/parquet/metadata.cc#L1482
   
   This codepath should not be being encountered with data written by parquet-rs AFAICT


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