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/06/03 12:51:06 UTC

[GitHub] [arrow-rs] tustvold opened a new pull request, #1782: Add ParquetFileArrowReader::try_new

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

   # Which issue does this PR close?
   
   Closes #.
   
   # Rationale for this change
    
   There is an extremely common pattern of creating a `SerializedFileReader` only to pass it to the constructor to `ParquetFileArrowReader`. Not only is this cumbersome, but the `Arc` part is a little bit surprising especially to new users.
   
   # What changes are included in this PR?
   
   Adds `try_new` and `try_new_with_options` methods to `ParquetFileArrowReader` to simplify this common case
   
   # Are there any user-facing changes?
   
   No
   


-- 
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] alamb commented on a diff in pull request #1782: Add `ParquetFileArrowReader::try_new`

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


##########
parquet/src/arrow/mod.rs:
##########
@@ -96,12 +96,9 @@
 //! # writer.close().unwrap();
 //!
 //! let file = File::open("data.parquet").unwrap();
-//! let file_reader = SerializedFileReader::new(file).unwrap();
 //!
-//! let file_metadata = file_reader.metadata().file_metadata();
-//! let mask = ProjectionMask::leaves(file_metadata.schema_descr(), [0]);
-//!
-//! let mut arrow_reader = ParquetFileArrowReader::new(Arc::new(file_reader));
+//! let mut arrow_reader = ParquetFileArrowReader::try_new(file).unwrap();

Review Comment:
   👍 



##########
parquet/src/arrow/arrow_reader.rs:
##########
@@ -145,15 +145,28 @@ impl ArrowReader for ParquetFileArrowReader {
 }
 
 impl ParquetFileArrowReader {
-    /// Create a new [`ParquetFileArrowReader`]
+    /// Create a new [`ParquetFileArrowReader`] with the provided [`ChunkReader`]

Review Comment:
   ```suggestion
       /// Create a new [`ParquetFileArrowReader`] with the provided [`ChunkReader`], 
       /// such as a `std::io::File`
   ```



-- 
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] codecov-commenter commented on pull request #1782: Add `ParquetFileArrowReader::try_new`

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #1782:
URL: https://github.com/apache/arrow-rs/pull/1782#issuecomment-1146376362

   # [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/1782?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1782](https://codecov.io/gh/apache/arrow-rs/pull/1782?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (02e81ef) into [master](https://codecov.io/gh/apache/arrow-rs/commit/eb706b76f1dbbe017c7081ba284979d19e2cc70b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (eb706b7) will **increase** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 02e81ef differs from pull request most recent head d2b6bf7. Consider uploading reports for the commit d2b6bf7 to get more accurate results
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #1782   +/-   ##
   =======================================
     Coverage   83.39%   83.39%           
   =======================================
     Files         198      198           
     Lines       56181    56171   -10     
   =======================================
   - Hits        46850    46844    -6     
   + Misses       9331     9327    -4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow-rs/pull/1782?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [parquet/src/arrow/mod.rs](https://codecov.io/gh/apache/arrow-rs/pull/1782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGFycXVldC9zcmMvYXJyb3cvbW9kLnJz) | `44.44% <ø> (ø)` | |
   | [parquet/src/arrow/arrow\_reader.rs](https://codecov.io/gh/apache/arrow-rs/pull/1782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGFycXVldC9zcmMvYXJyb3cvYXJyb3dfcmVhZGVyLnJz) | `96.87% <100.00%> (+0.74%)` | :arrow_up: |
   | [parquet/src/arrow/arrow\_writer.rs](https://codecov.io/gh/apache/arrow-rs/pull/1782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGFycXVldC9zcmMvYXJyb3cvYXJyb3dfd3JpdGVyLnJz) | `97.76% <100.00%> (-0.02%)` | :arrow_down: |
   | [parquet/src/arrow/schema.rs](https://codecov.io/gh/apache/arrow-rs/pull/1782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGFycXVldC9zcmMvYXJyb3cvc2NoZW1hLnJz) | `96.81% <100.00%> (-0.01%)` | :arrow_down: |
   | [parquet\_derive/src/parquet\_field.rs](https://codecov.io/gh/apache/arrow-rs/pull/1782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGFycXVldF9kZXJpdmUvc3JjL3BhcnF1ZXRfZmllbGQucnM=) | `65.53% <0.00%> (-0.46%)` | :arrow_down: |
   | [parquet/src/encodings/encoding.rs](https://codecov.io/gh/apache/arrow-rs/pull/1782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGFycXVldC9zcmMvZW5jb2RpbmdzL2VuY29kaW5nLnJz) | `93.65% <0.00%> (+0.19%)` | :arrow_up: |
   | [arrow/src/datatypes/datatype.rs](https://codecov.io/gh/apache/arrow-rs/pull/1782/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXJyb3cvc3JjL2RhdGF0eXBlcy9kYXRhdHlwZS5ycw==) | `65.79% <0.00%> (+0.37%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-rs/pull/1782?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/1782?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [eb706b7...d2b6bf7](https://codecov.io/gh/apache/arrow-rs/pull/1782?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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 #1782: Add `ParquetFileArrowReader::try_new`

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


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