SourabhBadhya commented on code in PR #5254:
URL: https://github.com/apache/hive/pull/5254#discussion_r1686427120


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java:
##########
@@ -1264,14 +1267,33 @@ public static void 
createMRWorkForMergingFiles(FileSinkOperator fsInput,
     FileSinkDesc fsOutputDesc = null;
     TableScanOperator tsMerge = null;
     if (!isBlockMerge) {
+      TableDesc ts = (TableDesc) fsInputDesc.getTableInfo().clone();
+      String storageHandlerClass = ts.getProperties().getProperty(
+              
org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_STORAGE);
+      HiveStorageHandler storageHandler = null;
+      try {
+        storageHandler = HiveUtils.getStorageHandler(conf, 
storageHandlerClass);
+      } catch (HiveException e) {
+        throw new SemanticException(e);
+      }
+      boolean isCustomDelete = false;
+      if (Context.Operation.DELETE.equals(fsInputDesc.getWriteOperation()) && 
storageHandler != null && storageHandler.supportsMergeFiles()) {
+        storageHandler.setCustomDeleteProperties(ts);
+        isCustomDelete = true;
+      }
+      
ts.getProperties().put(HiveCustomStorageHandlerUtils.WRITE_OPERATION_FOR_MERGE_TASK
 +

Review Comment:
   No its setting a property.



##########
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:
##########
@@ -8112,8 +8112,10 @@ protected Operator genFileSinkPlan(String dest, QB qb, 
Operator input)
       canBeMerged &= destinationTable.getStorageHandler().supportsMergeFiles();
       // TODO: Support for merge task for update, delete and merge queries

Review Comment:
   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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to