You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/10/01 08:16:00 UTC

[jira] [Commented] (PARQUET-1402) incorrect calculation column start offset for files created by parquet-mr 1.8.1

    [ https://issues.apache.org/jira/browse/PARQUET-1402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16633697#comment-16633697 ] 

ASF GitHub Bot commented on PARQUET-1402:
-----------------------------------------

wesm closed pull request #494: PARQUET-1402: [C++] parquet-mr writes dictionary_page_offset == 0 when it is (supposed?) …
URL: https://github.com/apache/parquet-cpp/pull/494
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/parquet/file_reader.cc b/src/parquet/file_reader.cc
index c5a0f342..499101a4 100644
--- a/src/parquet/file_reader.cc
+++ b/src/parquet/file_reader.cc
@@ -103,7 +103,8 @@ class SerializedRowGroup : public RowGroupReader::Contents {
     auto col = row_group_metadata_->ColumnChunk(i);
 
     int64_t col_start = col->data_page_offset();
-    if (col->has_dictionary_page() && col_start > col->dictionary_page_offset()) {
+    if (col->has_dictionary_page() &&
+        col->dictionary_page_offset() > 0 && col_start > col->dictionary_page_offset()) {
       col_start = col->dictionary_page_offset();
     }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> incorrect calculation column start offset for files created by parquet-mr 1.8.1
> -------------------------------------------------------------------------------
>
>                 Key: PARQUET-1402
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1402
>             Project: Parquet
>          Issue Type: Bug
>          Components: parquet-cpp
>            Reporter: Renat Valiullin
>            Assignee: Renat Valiullin
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: test.parquet
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> parquet-mr (at least version 1.8.1-fast-201712141648170019-ab0622b)
> writes to ColumnChunk's metadata dictionary_page_offset == 0 when it is (supposed?) equal to data_page_offset.
> calculation of col_start in std::unique_ptr<PageReader> GetColumnPageReader(int i)
> works incorrectly in this case.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)