PARQUET-2410: Use row count instead of value count to get row count from OffsetIndex#1234
Merged
wgtmac merged 1 commit intoapache:masterfrom Dec 11, 2023
Merged
Conversation
ConeyLiu
commented
Dec 7, 2023
| if (offsetIndex != null) { | ||
| long rowCount = 1 | ||
| + offsetIndex.getLastRowIndex(pageOrdinal, totalChunkValues) | ||
| + offsetIndex.getLastRowIndex(pageOrdinal, blockRowCount) |
Contributor
Author
There was a problem hiding this comment.
Here we should use the block row count instead of value count.
ConeyLiu
commented
Dec 7, 2023
| assertEquals( | ||
| inOffsetIndex.getLastRowIndex(k, inChunk.getValueCount()), | ||
| outOffsetIndex.getLastRowIndex(k, outChunk.getValueCount())); | ||
| inOffsetIndex.getLastRowIndex(k, inBlockMetaData.getRowCount()), |
ConeyLiu
commented
Dec 7, 2023
| } | ||
|
|
||
| private void addPrimitiveValueToSimpleGroup(Group g, PrimitiveType primitiveType) { | ||
| if (primitiveType.isRepetition(Type.Repetition.REPEATED)) { |
Contributor
Author
|
@wgtmac could you help to review this when you have time? Thanks a lot. |
Member
|
Thanks for notifying me! This is a busy week for me. I will try to review this by the end of this week. |
wgtmac
approved these changes
Dec 9, 2023
Member
wgtmac
left a comment
There was a problem hiding this comment.
Nice catch! Thanks for adding test as well.
Contributor
Author
|
Thanks @wgtmac |
5 tasks
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make sure you have checked all steps below.
Jira
them in the PR title. For example, "PARQUET-1234: My Parquet PR"
the ASF 3rd Party License Policy.
Tests
Commits
from "How to write a good git commit message":
Style
mvn spotless:apply -Pvector-pluginsDocumentation
We should use row count instead of value count to get row count from OffsetIndex in rewriter. Even this only influences the last row count and does not influence the result. It would be better to correct it.