voonhous commented on code in PR #17911:
URL: https://github.com/apache/hudi/pull/17911#discussion_r2699401933


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/HoodieIndexUtils.java:
##########
@@ -192,6 +178,15 @@ private static boolean 
isSecondaryIndexSupportedType(HoodieSchema schema) {
     }
   }
 
+  /**
+   * Check if the given schema type is a complex type (Record, Array, Map).
+   */
+  private static boolean isComplexType(HoodieSchema schema) {

Review Comment:
   ```
   - Test Create Expression Index *** FAILED ***
     org.apache.hudi.exception.HoodieMetadataIndexException: Cannot create 
expression index 'idx_datestr': Column 'ts' has unsupported data type 'UNION'. 
Complex types (RECORD, ARRAY, MAP) are not supported for indexing. Please 
choose a column with a primitive data type.
     at 
org.apache.hudi.index.HoodieIndexUtils.validateEligibilityForSecondaryOrExpressionIndex(HoodieIndexUtils.java:727)
     at 
org.apache.hudi.index.HoodieIndexUtils.getSecondaryOrExpressionIndexDefinition(HoodieIndexUtils.java:663)
     at 
org.apache.hudi.index.HoodieSparkIndexClient.createExpressionOrSecondaryIndex(HoodieSparkIndexClient.java:154)
     at 
org.apache.hudi.index.HoodieSparkIndexClient.create(HoodieSparkIndexClient.java:97)
     at 
org.apache.spark.sql.hudi.command.CreateIndexCommand.run(IndexCommands.scala:65)
     at 
org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:75)
     at 
org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:73)
     at 
org.apache.spark.sql.execution.command.ExecutedCommandExec.executeCollect(commands.scala:84)
     at 
org.apache.spark.sql.execution.QueryExecution$$anonfun$eagerlyExecuteCommands$1.$anonfun$applyOrElse$1(QueryExecution.scala:107)
     at 
org.apache.spark.sql.execution.SQLExecution$.$anonfun$withNewExecutionId$6(SQLExecution.scala:125)
     ```
     
     Don't think we can replace 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: [email protected]

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

Reply via email to