cshuo commented on code in PR #19307:
URL: https://github.com/apache/hudi/pull/19307#discussion_r3612637387
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/configuration/OptionsResolver.java:
##########
@@ -164,12 +164,24 @@ public static boolean isCowTable(Configuration conf) {
}
/**
- * Returns whether the table uses LSM tree storage layout.
+ * 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.
*/
- public static boolean isLsmTreeStorageLayout(Configuration conf) {
+ public static HoodieTableConfig.TableStorageLayout
getTableStorageLayout(Configuration conf) {
return HoodieTableConfig.TableStorageLayout.fromConfigValue(conf.getString(
HoodieTableConfig.TABLE_STORAGE_LAYOUT.key(),
- HoodieTableConfig.TABLE_STORAGE_LAYOUT.defaultValue())) == LSM_TREE;
+ (isInsertOperation(conf) || isBulkInsertOperation(conf))
Review Comment:
https://github.com/apache/hudi/issues/19325
--
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]