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



##########
File path: 
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveSyncTool.java
##########
@@ -194,11 +197,17 @@ private void syncSchema(String tableName, boolean 
tableExists, boolean useRealTi
       String outputFormatClassName = 
HoodieInputFormatUtils.getOutputFormatClassName(baseFileFormat);
       String serDeFormatClassName = 
HoodieInputFormatUtils.getSerDeClassName(baseFileFormat);
 
+      Map<String, String> serdeProperties = 
ConfigUtils.toMap(cfg.serdeProperties);
+      if (readAsOptimized) { // read optimized
+        serdeProperties.put(DefaultHoodieConfig.QUERY_TYPE_OPT_KEY, 
DefaultHoodieConfig.QUERY_TYPE_READ_OPTIMIZED_OPT_VAL);
+      } else { // read snapshot
+        serdeProperties.put(DefaultHoodieConfig.QUERY_TYPE_OPT_KEY, 
DefaultHoodieConfig.QUERY_TYPE_SNAPSHOT_OPT_VAL);

Review comment:
       Yes, the properties stored in the `serde` will convert to spark 
`options`  by spark datasource table.




-- 
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:
us...@infra.apache.org


Reply via email to