[
https://issues.apache.org/jira/browse/PARQUET-1801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17245832#comment-17245832
]
ASF GitHub Bot commented on PARQUET-1801:
-----------------------------------------
gszadovszky commented on a change in pull request #846:
URL: https://github.com/apache/parquet-mr/pull/846#discussion_r538260752
##########
File path:
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/util/ColumnPruner.java
##########
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.parquet.hadoop.util;
+
+import org.apache.parquet.hadoop.metadata.ColumnPath;
+import org.apache.parquet.schema.GroupType;
+import org.apache.parquet.schema.MessageType;
+import org.apache.parquet.schema.Type;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+public class ColumnPruner {
Review comment:
It is great that you factored out these methods to parquet-hadoop so you
do not have to copy-paste the same in parquet-cli.
Meanwhile, I would do a step further. I do not really like have such many
public methods where it is not clear how to use them and what for. I would
suggest moving all the other related code parts that are the same in
parquet-cli and parquet-tools (and the unit test) so you would have only one
public method that can be invoked with the input file, the output file and the
columns to be pruned.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add column index support for 'prune' command in Parquet-tools/cli
> -----------------------------------------------------------------
>
> Key: PARQUET-1801
> URL: https://issues.apache.org/jira/browse/PARQUET-1801
> Project: Parquet
> Issue Type: Improvement
> Components: parquet-cli, parquet-mr
> Affects Versions: 1.12.0
> Reporter: Xinli Shang
> Assignee: Xinli Shang
> Priority: Major
> Fix For: 1.12.0
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)