You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@parquet.apache.org by "ConeyLiu (via GitHub)" <gi...@apache.org> on 2023/12/07 11:40:06 UTC
[PR] PARQUET-2410: Use row count instead of value count to get row count from OffsetIndex [parquet-mr]
ConeyLiu opened a new pull request, #1234:
URL: https://github.com/apache/parquet-mr/pull/1234
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"
### Style
- [ ] My contribution adheres to the code style guidelines and Spotless passes.
- To apply the necessary changes, run `mvn spotless:apply -Pvector-plugins`
### 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
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.
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [PR] PARQUET-2410: Use row count instead of value count to get row count from OffsetIndex [parquet-mr]
Posted by "ConeyLiu (via GitHub)" <gi...@apache.org>.
ConeyLiu commented on code in PR #1234:
URL: https://github.com/apache/parquet-mr/pull/1234#discussion_r1418834894
##########
parquet-hadoop/src/test/java/org/apache/parquet/hadoop/rewrite/ParquetRewriterTest.java:
##########
@@ -908,8 +910,8 @@ private void validatePageIndex(Map<Integer, Integer> outFileColumnMapping) throw
for (int k = 0; k < inOffsetIndex.getPageCount(); k++) {
assertEquals(inOffsetIndex.getFirstRowIndex(k), outOffsetIndex.getFirstRowIndex(k));
assertEquals(
- inOffsetIndex.getLastRowIndex(k, inChunk.getValueCount()),
- outOffsetIndex.getLastRowIndex(k, outChunk.getValueCount()));
+ inOffsetIndex.getLastRowIndex(k, inBlockMetaData.getRowCount()),
Review Comment:
correct the UTs
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [PR] PARQUET-2410: Use row count instead of value count to get row count from OffsetIndex [parquet-mr]
Posted by "ConeyLiu (via GitHub)" <gi...@apache.org>.
ConeyLiu commented on PR #1234:
URL: https://github.com/apache/parquet-mr/pull/1234#issuecomment-1845194292
@wgtmac could you help to review this when you have time? Thanks a lot.
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [PR] PARQUET-2410: Use row count instead of value count to get row count from OffsetIndex [parquet-mr]
Posted by "ConeyLiu (via GitHub)" <gi...@apache.org>.
ConeyLiu commented on PR #1234:
URL: https://github.com/apache/parquet-mr/pull/1234#issuecomment-1851606723
Thanks @wgtmac
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [PR] PARQUET-2410: Use row count instead of value count to get row count from OffsetIndex [parquet-mr]
Posted by "ConeyLiu (via GitHub)" <gi...@apache.org>.
ConeyLiu commented on code in PR #1234:
URL: https://github.com/apache/parquet-mr/pull/1234#discussion_r1418835181
##########
parquet-hadoop/src/test/java/org/apache/parquet/hadoop/util/TestFileBuilder.java:
##########
@@ -173,6 +162,34 @@ private void addValueToSimpleGroup(Group g, Type type) {
}
}
+ private void addPrimitiveValueToSimpleGroup(Group g, PrimitiveType primitiveType) {
+ if (primitiveType.isRepetition(Type.Repetition.REPEATED)) {
Review Comment:
add repeated value
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [PR] PARQUET-2410: Use row count instead of value count to get row count from OffsetIndex [parquet-mr]
Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac merged PR #1234:
URL: https://github.com/apache/parquet-mr/pull/1234
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [PR] PARQUET-2410: Use row count instead of value count to get row count from OffsetIndex [parquet-mr]
Posted by "ConeyLiu (via GitHub)" <gi...@apache.org>.
ConeyLiu commented on code in PR #1234:
URL: https://github.com/apache/parquet-mr/pull/1234#discussion_r1418834384
##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/rewrite/ParquetRewriter.java:
##########
@@ -459,8 +462,9 @@ private void processChunk(
readValues += headerV1.getNum_values();
if (offsetIndex != null) {
long rowCount = 1
- + offsetIndex.getLastRowIndex(pageOrdinal, totalChunkValues)
+ + offsetIndex.getLastRowIndex(pageOrdinal, blockRowCount)
Review Comment:
Here we should use the block row count instead of value count.
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org
Re: [PR] PARQUET-2410: Use row count instead of value count to get row count from OffsetIndex [parquet-mr]
Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #1234:
URL: https://github.com/apache/parquet-mr/pull/1234#issuecomment-1847424262
Thanks for notifying me! This is a busy week for me. I will try to review this by the end of this week.
--
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: issues-unsubscribe@parquet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@parquet.apache.org
For additional commands, e-mail: issues-help@parquet.apache.org