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]


Reply via email to