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

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

satishkotha commented on a change in pull request #847:
URL: https://github.com/apache/parquet-mr/pull/847#discussion_r552980150



##########
File path: 
parquet-tools/src/main/java/org/apache/parquet/tools/command/MergeCommand.java
##########
@@ -46,19 +47,34 @@
           "   <output> is the destination parquet file"
   };
 
-  private static final String DEFAULT_KEY_VALUE_MERGE_STRATEGY = 
StrictKeyValueMetadataMergeStrategy.class.getName();
+  private static enum MergeStrategy {
+    STRICT,
+    CONCAT,
+    CUSTOM,
+  }
+  
   public static final Options OPTIONS;
 
   static {
     OPTIONS = new Options();
     Option mergeStrategy = Option.builder("s")
       .longOpt("mergeStrategy")
       .desc("Strategy to merge (key, value) pairs in metadata if there are 
multiple values for same key " +
-        "(default: " + DEFAULT_KEY_VALUE_MERGE_STRATEGY + ")")
+        "(default: " + MergeStrategy.STRICT + "). You can provide your custom 
implementation by specifying " +

Review comment:
       Ok. Done.




----------------------------------------------------------------
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]


> Allow different strategies to combine key values when merging parquet files
> ---------------------------------------------------------------------------
>
>                 Key: PARQUET-1951
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1951
>             Project: Parquet
>          Issue Type: Improvement
>            Reporter: satish
>            Priority: Minor
>
> I work on Apache Hudi project. We store some additional metadata in parquet 
> files (key range in the file, for example).  So the metadata is different in 
> different parquet files that we want to merge these files. 
> Here is what I'm thinking:
> 1) Merge command takes additional command line option: --strategy 
> <StrategyClassName>. 
> 2) We introduce new strategy class in parquet-hadoop to keep the same 
> behavior as today.  
> We can extend that class and provide our custom implementation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to