You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "gruuya (via GitHub)" <gi...@apache.org> on 2024/12/17 14:29:31 UTC

[PR] Supply a hint arrow schema for casting Parquet field types during scans [iceberg-rust]

gruuya opened a new pull request, #814:
URL: https://github.com/apache/iceberg-rust/pull/814

   This is so as to avoid a potential schema mismatch resulting from upcasting arrow 8 and 16 bit integers to Iceberg 32 bit integer type.
   
   This is one way to resolve #813. Note that this is dependent on https://github.com/apache/arrow-rs/pull/6892 getting merged (and picked up) first.
   
   I still need to think of a proper test case for this too.
   
   Closes #813.


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Supply a hint arrow schema for casting Parquet field types during scans [iceberg-rust]

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

   This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Supply a hint arrow schema for casting Parquet field types during scans [iceberg-rust]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #814: Supply a hint arrow schema for casting Parquet field types during scans
URL: https://github.com/apache/iceberg-rust/pull/814


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Supply a hint arrow schema for casting Parquet field types during scans [iceberg-rust]

Posted by "gruuya (via GitHub)" <gi...@apache.org>.
gruuya commented on code in PR #814:
URL: https://github.com/apache/iceberg-rust/pull/814#discussion_r1888623712


##########
crates/iceberg/src/arrow/reader.rs:
##########
@@ -195,12 +195,28 @@ impl ArrowReader {
 
         let should_load_page_index = row_selection_enabled && task.predicate.is_some();
 
+        let mut reader_options = ArrowReaderOptions::new().with_page_index(should_load_page_index);
+        if task.schema.as_struct().fields().iter().any(|field| {
+            matches!(
+                field.field_type.as_ref(),
+                Type::Primitive(PrimitiveType::Int)
+            )
+        }) {

Review Comment:
   Ideally this would also be done only if the a field with this type is also one of the projected ones.



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Supply a hint arrow schema for casting Parquet field types during scans [iceberg-rust]

Posted by "gruuya (via GitHub)" <gi...@apache.org>.
gruuya commented on code in PR #814:
URL: https://github.com/apache/iceberg-rust/pull/814#discussion_r1888623712


##########
crates/iceberg/src/arrow/reader.rs:
##########
@@ -195,12 +195,28 @@ impl ArrowReader {
 
         let should_load_page_index = row_selection_enabled && task.predicate.is_some();
 
+        let mut reader_options = ArrowReaderOptions::new().with_page_index(should_load_page_index);
+        if task.schema.as_struct().fields().iter().any(|field| {
+            matches!(
+                field.field_type.as_ref(),
+                Type::Primitive(PrimitiveType::Int)
+            )
+        }) {

Review Comment:
   Maybe this should be done only if the field with this type is also one of the projected ones.



-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] Supply a hint arrow schema for casting Parquet field types during scans [iceberg-rust]

Posted by "gruuya (via GitHub)" <gi...@apache.org>.
gruuya commented on PR #814:
URL: https://github.com/apache/iceberg-rust/pull/814#issuecomment-2556516072

   Making this a draft as the upstream dependency is also a draft atm.


-- 
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: issues-unsubscribe@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org