You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by "richardkerr (via GitHub)" <gi...@apache.org> on 2023/04/07 14:34:43 UTC

[GitHub] [parquet-mr] richardkerr opened a new pull request, #1048: PARQUET-2081: Fix support for files without ColumnIndexes

richardkerr opened a new pull request, #1048:
URL: https://github.com/apache/parquet-mr/pull/1048

   Fix for failure when writing ColumnChunks that do not have a ColumnIndex populated
   
   PARQUET-2081
   
   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [ ] My PR addresses the following [Parquet Jira](https://issues.apache.org/jira/browse/PARQUET/) issues and references them in the PR title. For example, "PARQUET-1234: My Parquet PR"
     - https://issues.apache.org/jira/browse/PARQUET-XXX
     - In case you are adding a dependency, check if the license complies with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   
   ### Tests
   
   - [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   
   ### Commits
   
   - [ ] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [ ] In case of new functionality, my PR adds documentation that describes how to use it.
     - All the public functions and the classes in the PR contain Javadoc that explain what it does
   


-- 
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: dev-unsubscribe@parquet.apache.org

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


[GitHub] [parquet-mr] wgtmac commented on a diff in pull request #1048: PARQUET-2081: Fix support for files without ColumnIndexes

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #1048:
URL: https://github.com/apache/parquet-mr/pull/1048#discussion_r1163478129


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java:
##########
@@ -1127,7 +1127,7 @@ public void appendColumnChunk(ColumnDescriptor descriptor, SeekableInputStream f
     long length = chunk.getTotalSize();
     long newChunkStart = out.getPos();
 
-    if (newChunkStart != start) {
+    if (offsetIndex != null && newChunkStart != start) {

Review Comment:
   Thank you for adding test!
   
   BTW, PARQUET-2081 is a fixed issue for a new feature. Would you mind opening a new JIRA for this bug fix?



-- 
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: dev-unsubscribe@parquet.apache.org

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


[GitHub] [parquet-mr] richardkerr commented on pull request #1048: PARQUET-2081: Fix support for files without ColumnIndexes

Posted by "richardkerr (via GitHub)" <gi...@apache.org>.
richardkerr commented on PR #1048:
URL: https://github.com/apache/parquet-mr/pull/1048#issuecomment-1505354950

   I started committing against PARQUET-2081 because it was still open at the time and this issue was introduced by those changes, it seemed reasonable to me to attribute this fix to that ticket.   
   
   Otherwise.  I put in a request to get a jira account almost a week ago with no feedback since so unable to create anything.  Can you create the ticket for me in the meantime?  Or approve the jira access request?


-- 
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: dev-unsubscribe@parquet.apache.org

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


[GitHub] [parquet-mr] wgtmac commented on pull request #1048: PARQUET-2266: Fix support for files without ColumnIndexes

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #1048:
URL: https://github.com/apache/parquet-mr/pull/1048#issuecomment-1506227667

   @richardkerr Sorry for the bad experience! Unfortunately, I do not have the permission to receive the email for JIRA account request. Can you help? @gszadovszky @shangxinli @ggershinsky 
   
   I have created a new JIRA and updated the title. Will backport it into 1.12.4 and 1.13.1 branch as well.


-- 
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: dev-unsubscribe@parquet.apache.org

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


[GitHub] [parquet-mr] gszadovszky commented on pull request #1048: PARQUET-2266: Fix support for files without ColumnIndexes

Posted by "gszadovszky (via GitHub)" <gi...@apache.org>.
gszadovszky commented on PR #1048:
URL: https://github.com/apache/parquet-mr/pull/1048#issuecomment-1506512526

   @wgtmac, @richardkerr, it seems these jira account requests are sent to the private list (for the PMC). I'll check these requests and approve them.
   @shangxinli, @ggershinsky, we need to check these regularly and approve the requests so the new contributors can work on our project.


-- 
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: dev-unsubscribe@parquet.apache.org

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


[GitHub] [parquet-mr] richardkerr commented on pull request #1048: PARQUET-2266: Fix support for files without ColumnIndexes

Posted by "richardkerr (via GitHub)" <gi...@apache.org>.
richardkerr commented on PR #1048:
URL: https://github.com/apache/parquet-mr/pull/1048#issuecomment-1507271187

   Thanks all, my jira account is successfully created for any future issues :)  
   
   Do you need anything else from me before this can be merged?  


-- 
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: dev-unsubscribe@parquet.apache.org

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


[GitHub] [parquet-mr] wgtmac merged pull request #1048: PARQUET-2266: Fix support for files without ColumnIndexes

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac merged PR #1048:
URL: https://github.com/apache/parquet-mr/pull/1048


-- 
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: dev-unsubscribe@parquet.apache.org

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


[GitHub] [parquet-mr] wgtmac commented on a diff in pull request #1048: PARQUET-2081: Fix support for files without ColumnIndexes

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #1048:
URL: https://github.com/apache/parquet-mr/pull/1048#discussion_r1161378185


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java:
##########
@@ -1127,7 +1127,7 @@ public void appendColumnChunk(ColumnDescriptor descriptor, SeekableInputStream f
     long length = chunk.getTotalSize();
     long newChunkStart = out.getPos();
 
-    if (newChunkStart != start) {
+    if (offsetIndex != null && newChunkStart != start) {

Review Comment:
   Good catch! Could you please add a test case to make sure this is well covered now?



-- 
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: dev-unsubscribe@parquet.apache.org

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


[GitHub] [parquet-mr] wgtmac commented on pull request #1048: PARQUET-2266: Fix support for files without ColumnIndexes

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #1048:
URL: https://github.com/apache/parquet-mr/pull/1048#issuecomment-1507834637

   Thanks @richardkerr for the fix!
   
   I have merged it to the master branch and opened https://github.com/apache/parquet-mr/pull/1058 to backport it into `1.13.x` branch. 
   
   Unfortunately the release management on `1.12.x` branch is a little bit tricky so I think we will not release any 1.12.x unless requested.


-- 
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: dev-unsubscribe@parquet.apache.org

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


[GitHub] [parquet-mr] richardkerr commented on a diff in pull request #1048: PARQUET-2081: Fix support for files without ColumnIndexes

Posted by "richardkerr (via GitHub)" <gi...@apache.org>.
richardkerr commented on code in PR #1048:
URL: https://github.com/apache/parquet-mr/pull/1048#discussion_r1162736648


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java:
##########
@@ -1127,7 +1127,7 @@ public void appendColumnChunk(ColumnDescriptor descriptor, SeekableInputStream f
     long length = chunk.getTotalSize();
     long newChunkStart = out.getPos();
 
-    if (newChunkStart != start) {
+    if (offsetIndex != null && newChunkStart != start) {

Review Comment:
   Found a file without ColumnIndexes that was added for another test case - if you have any advice how it could be generated instead I'd be happy to hear but it looks prohibitive to do so with the current implementation.



-- 
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: dev-unsubscribe@parquet.apache.org

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


[GitHub] [parquet-mr] richardkerr commented on pull request #1048: PARQUET-2081: Fix support for files without ColumnIndexes

Posted by "richardkerr (via GitHub)" <gi...@apache.org>.
richardkerr commented on PR #1048:
URL: https://github.com/apache/parquet-mr/pull/1048#issuecomment-1500348451

   > My PR adds the following unit tests OR does not need testing for this extremely good reason:
   On this, I was struggling to put together a test that was able to replicate the issue without extensive changes to the writers - if anyone has insight on a good way to do that please make the change.  Otherwise I feel the change is trivial enough that a unit test is not necessarily worth the effort and FWIW I have verified it using externally generated files.


-- 
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: dev-unsubscribe@parquet.apache.org

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


[GitHub] [parquet-mr] wgtmac commented on pull request #1048: PARQUET-2266: Fix support for files without ColumnIndexes

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #1048:
URL: https://github.com/apache/parquet-mr/pull/1048#issuecomment-1506230575

   @richardkerr Could you please provide your email address and expected user name to use? I can create a JIRA account for you and assign the JIRA to you.


-- 
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: dev-unsubscribe@parquet.apache.org

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