You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "morningman (via GitHub)" <gi...@apache.org> on 2023/06/12 06:55:21 UTC

[GitHub] [doris] morningman commented on a diff in pull request #20679: [Feature][Fix](multi-catalog) Implements transactional hive full acid tables.

morningman commented on code in PR #20679:
URL: https://github.com/apache/doris/pull/20679#discussion_r1226168072


##########
fe/fe-core/src/main/java/org/apache/doris/planner/external/HiveScanNode.java:
##########
@@ -192,12 +195,50 @@ private void getFileSplitByPartitions(HiveMetaStoreCache cache, List<HivePartiti
                 for (HiveMetaStoreCache.HiveFileStatus status : fileCacheValue.getFiles()) {
                     allFiles.addAll(splitFile(status.getPath(), status.getBlockSize(),
                             status.getBlockLocations(), status.getLength(), status.getModificationTime(),
-                            isSplittable, fileCacheValue.getPartitionValues()));
+                            isSplittable, fileCacheValue.getPartitionValues(), fileCacheValue.getAcidInfo()));
                 }
             }
         }
     }
 
+    private List<Split> splitFile(Path path, long blockSize, BlockLocation[] blockLocations, long length,

Review Comment:
   Better to find a way to extract the common part of `splitFile` and the same method defined in `FileScanNode`, or it is hard to maintain.



##########
fe/fe-core/src/main/java/org/apache/doris/common/util/BrokerUtil.java:
##########
@@ -114,17 +114,19 @@ public static String printBroker(String brokerName, TNetworkAddress address) {
 
     public static List<String> parseColumnsFromPath(String filePath, List<String> columnsFromPath)
             throws UserException {
-        return parseColumnsFromPath(filePath, columnsFromPath, true);
+        return parseColumnsFromPath(filePath, columnsFromPath, true, false);
     }
 
     public static List<String> parseColumnsFromPath(
             String filePath,
             List<String> columnsFromPath,
-            boolean caseSensitive)
+            boolean caseSensitive,
+            boolean isACID)
             throws UserException {
         if (columnsFromPath == null || columnsFromPath.isEmpty()) {
             return Collections.emptyList();
         }
+        int pathCount = isACID ? 3 : 2;

Review Comment:
   Add comment explain `3` and `2`, better give an example



-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org