World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#9095] fix(dto): Ensure index field names are not null (#9118)
Kwon Taeheone195feea6859
diff --git a/common/src/main/java/org/apache/gravitino/dto/requests/TableCreateRequest.java b/common/src/main/java/org/apache/gravitino/dto/requests/TableCreateRequest.javaindex d6d22ddb9f..965de27c17 100644--- a/common/src/main/java/org/apache/gravitino/dto/requests/TableCreateRequest.java+++ b/common/src/main/java/org/apache/gravitino/dto/requests/TableCreateRequest.java@@ -161,7 +161,10 @@ public class TableCreateRequest implements RESTRequest {index -> {Preconditions.checkArgument(index.type() != null, "Index type cannot be null");Preconditions.checkArgument(- index.fieldNames().length > 0, "Index field names cannot be null");+ index.fieldNames() != null, "Index fieldNames cannot be null");+ Preconditions.checkArgument(+ index.fieldNames().length > 0,+ "Index fieldNames length must be greater than 0");});}}