tarun11Mavani commented on code in PR #18710:
URL: https://github.com/apache/pinot/pull/18710#discussion_r3421350116


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -1603,6 +1604,23 @@ private static void 
validateIndexingConfigAndFieldConfigList(TableConfig tableCo
 
     
validateMultiColumnTextIndex(indexingConfig.getMultiColumnTextIndexConfig());
 
+    // OPEN_STRUCT materialized child columns use a reserved separator '$' in 
their name. When any
+    // schema field is OPEN_STRUCT, reject user columns whose names contain 
'$' to prevent naming
+    // collisions with future per-key materialized columns (col$key) or the 
sparse column
+    // (col$__sparse__). This validation runs here (with full schema access) 
rather than per-field
+    // because each OpenStructIndexType.validate() call only sees one field at 
a time.
+    boolean anyOpenStruct = schema.getAllFieldSpecs().stream()
+        .anyMatch(fs -> fs.getDataType() == DataType.OPEN_STRUCT);
+    if (anyOpenStruct) {
+      for (FieldSpec fieldSpec : schema.getAllFieldSpecs()) {
+        Preconditions.checkState(
+            fieldSpec.getDataType() == DataType.OPEN_STRUCT

Review Comment:
   fixed this. 



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to