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

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

ConeyLiu commented on code in PR #1183:
URL: https://github.com/apache/parquet-mr/pull/1183#discussion_r1381382668


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/rewrite/ParquetRewriter.java:
##########
@@ -265,14 +265,9 @@ public void processBlocks() throws IOException {
   }
 
   private void processBlocksFromReader(IndexCache indexCache) throws 
IOException {
-    PageReadStore store = reader.readNextRowGroup();
-    ColumnReadStoreImpl crStore = new ColumnReadStoreImpl(store, new 
DummyGroupConverter(), schema, originalCreatedBy);
-
-    int blockId = 0;
-    while (store != null) {
-      writer.startBlock(store.getRowCount());

Review Comment:
   We don't need to get the row count from the `PageReadStore` since getting 
the `PageReadStore` will force read the whole row group data into memory.





> Avoid unnecessary reading of RowGroup data during rewriting
> -----------------------------------------------------------
>
>                 Key: PARQUET-2372
>                 URL: https://issues.apache.org/jira/browse/PARQUET-2372
>             Project: Parquet
>          Issue Type: Improvement
>            Reporter: Xianyang Liu
>            Priority: Major
>
> This patch aims to reduce the unnecessary RowGroup data reading during 
> rewriting.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to