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


##########
pinot-spi/src/main/java/org/apache/pinot/spi/data/ComplexFieldSpec.java:
##########
@@ -132,6 +172,46 @@ public static ComplexFieldSpec 
fromMapFieldSpec(MapFieldSpec mapFieldSpec) {
         Map.of(KEY_FIELD, mapFieldSpec.getKeyFieldSpec(), VALUE_FIELD, 
mapFieldSpec.getValueFieldSpec()));
   }
 
+  /**
+   * View over a {@link ComplexFieldSpec} whose {@code dataType} is {@link 
DataType#OPEN_STRUCT}.
+   * Exposes the per-key declared types (from {@code childFieldSpecs}) and the 
required fallback
+   * {@code defaultValueFieldSpec}.
+   */
+  public static class OpenStructFieldSpec {

Review Comment:
   make sense.



##########
pinot-spi/src/main/java/org/apache/pinot/spi/data/ComplexFieldSpec.java:
##########
@@ -83,6 +107,22 @@ public Map<String, FieldSpec> getChildFieldSpecs() {
     return _childFieldSpecs;
   }
 
+  /// Returns the {@code defaultValueFieldSpec} for OPEN_STRUCT columns, 
falling back to
+  /// {@link #DEFAULT_OPEN_STRUCT_VALUE_FIELD_SPEC} (single-value STRING) when 
the schema did
+  /// not declare one. Returns {@code null} for non-OPEN_STRUCT data types.
+  @JsonProperty("defaultValueFieldSpec")

Review Comment:
   done.



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