You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "LinMingQiang (via GitHub)" <gi...@apache.org> on 2023/02/06 09:46:36 UTC

[GitHub] [hudi] LinMingQiang commented on a diff in pull request #7718: [HUDI-5591] HoodieSparkSqlWriter#getHiveTableNames needs to consider …

LinMingQiang commented on code in PR #7718:
URL: https://github.com/apache/hudi/pull/7718#discussion_r1097152042


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala:
##########
@@ -879,13 +880,17 @@ object HoodieSparkSqlWriter {
     if (tableType.equals(COW_TABLE_TYPE_OPT_VAL)) {
       List(tableName)
     } else {
-      val roSuffix = if (hoodieConfig.getBooleanOrDefault(HIVE_SKIP_RO_SUFFIX_FOR_READ_OPTIMIZED_TABLE)) {
-        ""
+      if (!hoodieConfig.getStringOrDefault(HIVE_SYNC_TABLE_STRATEGY).equals(HoodieSyncTableStrategy.ALL.name())) {
+        List(tableName)
       } else {
-        HiveSyncTool.SUFFIX_READ_OPTIMIZED_TABLE
+        val roSuffix = if (hoodieConfig.getBooleanOrDefault(HIVE_SKIP_RO_SUFFIX_FOR_READ_OPTIMIZED_TABLE)) {
+          ""
+        } else {

Review Comment:
   Okay, I'll do it.



##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala:
##########
@@ -879,13 +880,17 @@ object HoodieSparkSqlWriter {
     if (tableType.equals(COW_TABLE_TYPE_OPT_VAL)) {
       List(tableName)
     } else {
-      val roSuffix = if (hoodieConfig.getBooleanOrDefault(HIVE_SKIP_RO_SUFFIX_FOR_READ_OPTIMIZED_TABLE)) {
-        ""
+      if (!hoodieConfig.getStringOrDefault(HIVE_SYNC_TABLE_STRATEGY).equals(HoodieSyncTableStrategy.ALL.name())) {
+        List(tableName)
       } else {
-        HiveSyncTool.SUFFIX_READ_OPTIMIZED_TABLE
+        val roSuffix = if (hoodieConfig.getBooleanOrDefault(HIVE_SKIP_RO_SUFFIX_FOR_READ_OPTIMIZED_TABLE)) {
+          ""
+        } else {

Review Comment:
   👌, I'll do it.



-- 
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@hudi.apache.org

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