voonhous commented on code in PR #17911:
URL: https://github.com/apache/hudi/pull/17911#discussion_r2699172946
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/HoodieIndexUtils.java:
##########
@@ -719,28 +714,19 @@ static void
validateEligibilityForSecondaryOrExpressionIndex(HoodieTableMetaClie
String columnName = sourceFields.get(0); // We know there's only one
column from the check above
// First check if the field exists
- Pair<String, HoodieSchemaField> fieldSchema =
HoodieSchemaUtils.getNestedField(tableSchema, columnName)
+ Pair<String, HoodieSchemaField> fieldSchemaPair =
HoodieSchemaUtils.getNestedField(tableSchema, columnName)
.orElseThrow(() -> new HoodieMetadataIndexException(String.format(
- "Cannot create %s index '%s': Column '%s' does not exist in the
table schema. "
- + "Please verify the column name and ensure it exists in the
table.",
- indexType.equals(PARTITION_NAME_SECONDARY_INDEX) ? "secondary" :
"expression",
+ "Cannot create %s index '%s': Column '%s' does not exist in the
table schema. "
+ + "Please verify the column name and ensure it exists in the
table.",
+ indexType.equals(PARTITION_NAME_SECONDARY_INDEX) ? "secondary" :
"expression",
userIndexName, columnName)));
- // Check for complex types (RECORD, ARRAY, MAP) - not supported for any
index type
- if (!validateDataTypeForSecondaryOrExpressionIndex(sourceFields,
tableSchema)) {
Review Comment:
Yeap, will remove accompanying tests too.
--
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]