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/25 07:52:14 UTC

[GitHub] [arrow-rs] liukun4515 opened a new pull request, #1947: write columnmetadata to the behind of the column chunk data, not the ColumnChunk

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

   # Which issue does this PR close?
   
   <!---
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #1946
   
   # 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] tustvold merged pull request #1947: write columnmetadata to the behind of the column chunk data, not the ColumnChunk

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


-- 
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] liukun4515 commented on a diff in pull request #1947: write columnmetadata to the behind of the column chunk data, not the ColumnChunk

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


##########
parquet/src/file/writer.rs:
##########
@@ -435,12 +435,15 @@ impl<'a, W: Write> SerializedPageWriter<'a, W> {
         Ok(self.sink.bytes_written() - start_pos)
     }
 
-    /// Serializes column chunk into Thrift.
+    /// Serializes column metadata into Thrift.
     /// Returns Ok() if there are not errors serializing and writing data into the sink.
     #[inline]
-    fn serialize_column_chunk(&mut self, chunk: parquet::ColumnChunk) -> Result<()> {
+    fn serialize_column_chunk(

Review Comment:
   I don't have any preferences
   



-- 
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] liukun4515 commented on pull request #1947: write columnmetadata to the behind of the column chunk data, not the ColumnChunk

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

   Many system or reader just read the footer and get the metadata, I think we should just follow the parquet-format.
   Maybe it's just historical issues or historical design


-- 
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 #1947: write columnmetadata to the behind of the column chunk data, not the ColumnChunk

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


##########
parquet/src/file/metadata.rs:
##########
@@ -611,6 +611,29 @@ impl ColumnChunkMetaData {
             encrypted_column_metadata: None,
         }
     }
+
+    /// Method to convert to Thrift `ColumnMetaData`
+    pub fn to_column_metadata_thrift(&self) -> ColumnMetaData {

Review Comment:
   Could we change `to_thrift` above to use this method



##########
parquet/src/file/writer.rs:
##########
@@ -435,12 +435,15 @@ impl<'a, W: Write> SerializedPageWriter<'a, W> {
         Ok(self.sink.bytes_written() - start_pos)
     }
 
-    /// Serializes column chunk into Thrift.
+    /// Serializes column metadata into Thrift.
     /// Returns Ok() if there are not errors serializing and writing data into the sink.
     #[inline]
-    fn serialize_column_chunk(&mut self, chunk: parquet::ColumnChunk) -> Result<()> {
+    fn serialize_column_chunk(

Review Comment:
   Could we just remove this method and move its content into write_metadata?



-- 
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 #1947: write columnmetadata to the behind of the column chunk data, not the ColumnChunk

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

   # [Codecov](https://codecov.io/gh/apache/arrow-rs/pull/1947?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 [#1947](https://codecov.io/gh/apache/arrow-rs/pull/1947?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b104d64) into [master](https://codecov.io/gh/apache/arrow-rs/commit/9f7b6004d365b0c0bac8e30170b49bdd66cc7df0?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9f7b600) will **increase** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #1947   +/-   ##
   =======================================
     Coverage   83.48%   83.48%           
   =======================================
     Files         221      221           
     Lines       57054    57068   +14     
   =======================================
   + Hits        47629    47641   +12     
   - Misses       9425     9427    +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow-rs/pull/1947?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/file/metadata.rs](https://codecov.io/gh/apache/arrow-rs/pull/1947/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-cGFycXVldC9zcmMvZmlsZS9tZXRhZGF0YS5ycw==) | `95.32% <100.00%> (+0.19%)` | :arrow_up: |
   | [parquet/src/file/writer.rs](https://codecov.io/gh/apache/arrow-rs/pull/1947/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-cGFycXVldC9zcmMvZmlsZS93cml0ZXIucnM=) | `92.92% <100.00%> (ø)` | |
   | [arrow/src/datatypes/datatype.rs](https://codecov.io/gh/apache/arrow-rs/pull/1947/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.42% <0.00%> (-0.38%)` | :arrow_down: |
   | [parquet\_derive/src/parquet\_field.rs](https://codecov.io/gh/apache/arrow-rs/pull/1947/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.98% <0.00%> (-0.23%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-rs/pull/1947?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/1947?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 [9f7b600...b104d64](https://codecov.io/gh/apache/arrow-rs/pull/1947?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] liukun4515 commented on pull request #1947: write columnmetadata to the behind of the column chunk data, not the ColumnChunk

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

   @tustvold PTAL


-- 
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] liukun4515 commented on pull request #1947: write columnmetadata to the behind of the column chunk data, not the ColumnChunk

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

   > I can't help wondering if this was an oversight in the original parquet specification, not collocating column chunk metadata in the footer, that has since been papered over. All readers I can find simply read the ColumnChunkMetadata from the footer and ignore everything else.
   
   I have the same confuse like you about the meatdata.
   I go through the parquet-mr(Java version) which did't append this metadata in end of each column, and read this metadata from the Filemetadata in the footer.
   
   But from the definition of the format https://github.com/apache/parquet-format/blob/54e53e5d7794d383529dd30746378f19a12afd58/src/main/thrift/parquet.thrift#L790, we can know the `file_offset` is required field and the https://github.com/apache/parquet-format/blob/54e53e5d7794d383529dd30746378f19a12afd58/src/main/thrift/parquet.thrift#L796 ColumnMetaData is a optional field.
   


-- 
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] liukun4515 commented on a diff in pull request #1947: write columnmetadata to the behind of the column chunk data, not the ColumnChunk

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


##########
parquet/src/file/metadata.rs:
##########
@@ -611,6 +611,29 @@ impl ColumnChunkMetaData {
             encrypted_column_metadata: None,
         }
     }
+
+    /// Method to convert to Thrift `ColumnMetaData`
+    pub fn to_column_metadata_thrift(&self) -> ColumnMetaData {

Review Comment:
   good catch



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