Re: [PR] [HUDI-7317] FlinkTableFactory snatifyCheck should contains index type [hudi]

2024-01-21 Thread via GitHub


danny0405 merged PR #10541:
URL: https://github.com/apache/hudi/pull/10541


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

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



Re: [PR] [HUDI-7317] FlinkTableFactory snatifyCheck should contains index type [hudi]

2024-01-21 Thread via GitHub


xuzifu666 commented on code in PR #10541:
URL: https://github.com/apache/hudi/pull/10541#discussion_r1461296888


##
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableFactory.java:
##
@@ -176,13 +177,24 @@ public Set> optionalOptions() {
*/
   private void sanityCheck(Configuration conf, ResolvedSchema schema) {
 checkTableType(conf);
+checkIndexType(conf);
 
 if (!OptionsResolver.isAppendMode(conf)) {
   checkRecordKey(conf, schema);
 }
 StreamerUtil.checkPreCombineKey(conf, schema.getColumnNames());
   }
 
+  /**
+   * Validate the index type.
+   */
+  private void checkIndexType(Configuration conf) {
+String indexType = conf.get(FlinkOptions.INDEX_TYPE);
+if (!StringUtils.isNullOrEmpty(indexType)) {
+  HoodieIndexConfig.INDEX_TYPE.checkValues(indexType);

Review Comment:
   For example,user create table in Flink Engine such like set 
index.type='BUCK',engine not error out until write data into table. So error 
out when set table schema before user write is kind. @danny0405 



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

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



Re: [PR] [HUDI-7317] FlinkTableFactory snatifyCheck should contains index type [hudi]

2024-01-21 Thread via GitHub


danny0405 commented on code in PR #10541:
URL: https://github.com/apache/hudi/pull/10541#discussion_r1461295667


##
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableFactory.java:
##
@@ -176,13 +177,24 @@ public Set> optionalOptions() {
*/
   private void sanityCheck(Configuration conf, ResolvedSchema schema) {
 checkTableType(conf);
+checkIndexType(conf);
 
 if (!OptionsResolver.isAppendMode(conf)) {
   checkRecordKey(conf, schema);
 }
 StreamerUtil.checkPreCombineKey(conf, schema.getColumnNames());
   }
 
+  /**
+   * Validate the index type.
+   */
+  private void checkIndexType(Configuration conf) {
+String indexType = conf.get(FlinkOptions.INDEX_TYPE);
+if (!StringUtils.isNullOrEmpty(indexType)) {
+  HoodieIndexConfig.INDEX_TYPE.checkValues(indexType);

Review Comment:
   In which case, the user can specify the index type as wrong?



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

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



Re: [PR] [HUDI-7317] FlinkTableFactory snatifyCheck should contains index type [hudi]

2024-01-21 Thread via GitHub


hudi-bot commented on PR #10541:
URL: https://github.com/apache/hudi/pull/10541#issuecomment-1902611975

   
   ## CI report:
   
   * 44aabdf9fed879357dcca4e7ce8ff7420f1ce8a4 Azure: 
[FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22085)
 
   
   
   Bot commands
 @hudi-bot supports the following commands:
   
- `@hudi-bot run azure` re-run the last Azure build
   


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

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



Re: [PR] [HUDI-7317] FlinkTableFactory snatifyCheck should contains index type [hudi]

2024-01-21 Thread via GitHub


hudi-bot commented on PR #10541:
URL: https://github.com/apache/hudi/pull/10541#issuecomment-1902567532

   
   ## CI report:
   
   * 44aabdf9fed879357dcca4e7ce8ff7420f1ce8a4 Azure: 
[PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=22085)
 
   
   
   Bot commands
 @hudi-bot supports the following commands:
   
- `@hudi-bot run azure` re-run the last Azure build
   


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

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



Re: [PR] [HUDI-7317] FlinkTableFactory snatifyCheck should contains index type [hudi]

2024-01-21 Thread via GitHub


hudi-bot commented on PR #10541:
URL: https://github.com/apache/hudi/pull/10541#issuecomment-1902565571

   
   ## CI report:
   
   * 44aabdf9fed879357dcca4e7ce8ff7420f1ce8a4 UNKNOWN
   
   
   Bot commands
 @hudi-bot supports the following commands:
   
- `@hudi-bot run azure` re-run the last Azure build
   


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

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