pengzhiwei2018 commented on a change in pull request #2925:
URL: https://github.com/apache/hudi/pull/2925#discussion_r648003005



##########
File path: 
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveSyncTool.java
##########
@@ -106,13 +106,13 @@ public void syncHoodieTable() {
       if (hoodieHiveClient != null) {
         switch (hoodieHiveClient.getTableType()) {
           case COPY_ON_WRITE:
-            syncHoodieTable(snapshotTableName, false);
+            syncHoodieTable(snapshotTableName, false, false);

Review comment:
       Hi @nsivabalan, we use the `getBaseFileOnlyView` to read data for COW 
for both read-optimized & snapshot in `DefaultSource`. So it does not matter 
here. we can see the code in `DefaultSource`:
   
   > (tableType, queryType, isBootstrappedTable) match {
         case (COPY_ON_WRITE, QUERY_TYPE_SNAPSHOT_OPT_VAL, false) |
              (COPY_ON_WRITE, QUERY_TYPE_READ_OPTIMIZED_OPT_VAL, false) |
              (MERGE_ON_READ, QUERY_TYPE_READ_OPTIMIZED_OPT_VAL, false) =>
           getBaseFileOnlyView(useHoodieFileIndex, sqlContext, parameters, 
schema, tablePath,
             readPaths, metaClient)
   
   And according to our doc, the `read-optimized` type is designed for MOR 
table. So here `snapshot` is all right for COW.




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