cshuo commented on code in PR #19390:
URL: https://github.com/apache/hudi/pull/19390#discussion_r3682410156


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/configuration/OptionsResolver.java:
##########
@@ -166,13 +166,13 @@ public static boolean isCowTable(Configuration conf) {
   /**
    * Returns the configured table storage layout.
    *
-   * <p>Insert and bulk insert operations preserve duplicate record keys and 
therefore default to
-   * the regular storage layout. Other operations use Flink's LSM tree default.
+   * <p>Insert operations preserve duplicate record keys and therefore default 
to the regular
+   * storage layout. Other operations use Flink's LSM tree default.
    */
   public static HoodieTableConfig.TableStorageLayout 
getTableStorageLayout(Configuration conf) {
     return HoodieTableConfig.TableStorageLayout.fromConfigValue(conf.getString(
         HoodieTableConfig.TABLE_STORAGE_LAYOUT.key(),
-        (isInsertOperation(conf) || isBulkInsertOperation(conf))
+        isInsertOperation(conf)

Review Comment:
   By design. A new bulk-insert table without an explicit layout is persisted 
as LSM, so a later insert is rejected because insert does not preserve the LSM 
sorted-run invariant. To retain the previous bulk_insert-to-insert workflow, 
`hoodie.table.storage.layout=default` must be configured when the table is 
created, before the first bulk insert. Existing tables keep their persisted 
layout and are unaffected. Setting DEFAULT only on a later insert does not 
convert an existing LSM 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to