okumin commented on code in PR #5409:
URL: https://github.com/apache/hive/pull/5409#discussion_r1818948387


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/CustomPartitionVertex.java:
##########
@@ -75,23 +75,13 @@
  */
 public class CustomPartitionVertex extends VertexManagerPlugin {
 
-  public class PathComparatorForSplit implements Comparator<InputSplit> {
+  public static class ComparatorForSplit implements Comparator<InputSplit> {

Review Comment:
   I renamed it to HiveInputSplitComparator and changed the type parameter.
   
https://github.com/apache/hive/pull/5409/commits/ae7444e8e1c2de95bfc1915af3d3c0245af4b472



##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/CustomPartitionVertex.java:
##########
@@ -221,28 +211,26 @@ public void onRootVertexInitialized(String inputName, 
InputDescriptor inputDescr
       } else if (event instanceof InputDataInformationEvent) {
         dataInformationEventSeen = true;
         InputDataInformationEvent diEvent = (InputDataInformationEvent) event;
-        FileSplit fileSplit;
+        HiveInputSplit inputSplit;
         try {
-          fileSplit = getFileSplitFromEvent(diEvent);
+          inputSplit = getInputSplitFromEvent(diEvent);
         } catch (IOException e) {
           throw new RuntimeException("Failed to get file split for event: " + 
diEvent, e);
         }
-        Set<FileSplit> fsList =
-            
pathFileSplitsMap.get(Utilities.getBucketFileNameFromPathSubString(fileSplit.getPath()
-                .getName()));
-        if (fsList == null) {
-          fsList = new TreeSet<FileSplit>(new PathComparatorForSplit());
-          pathFileSplitsMap.put(
-              
Utilities.getBucketFileNameFromPathSubString(fileSplit.getPath().getName()), 
fsList);
+        final int bucketId = inputSplit.getBucketId().orElse(-1);
+        Set<HiveInputSplit> inputSplits = bucketFileSplitsMap.get(bucketId);
+        if (inputSplits == null) {

Review Comment:
   Done
   
https://github.com/apache/hive/pull/5409/commits/ae7444e8e1c2de95bfc1915af3d3c0245af4b472



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to