Jackie-Jiang commented on code in PR #18984:
URL: https://github.com/apache/pinot/pull/18984#discussion_r3581778843


##########
pinot-spi/src/main/java/org/apache/pinot/spi/data/FieldSpec.java:
##########
@@ -172,6 +172,14 @@ public enum MaxLengthExceedStrategy {
   @Nullable
   protected List<String> _aliases;
 
+  // Optional, free-form per-column metadata. It is additive, excluded from 
backward-compatibility
+  // checks, and omitted from serialization when unset/empty. The keys and 
their interpretation are
+  // defined by whoever populates it; the core schema attaches no semantics to 
it.
+  @JsonProperty("extraMetadata")

Review Comment:
   Suggest just calling it `"metadata"`, which is a more common term for field 
spec



##########
pinot-spi/src/main/java/org/apache/pinot/spi/data/FieldSpec.java:
##########
@@ -270,6 +278,15 @@ public void setAliases(@Nullable List<String> aliases) {
     _aliases = aliases == null || aliases.isEmpty() ? null : aliases;
   }
 
+  @Nullable
+  public Map<String, String> getExtraMetadata() {
+    return _extraMetadata;
+  }
+
+  public void setExtraMetadata(@Nullable Map<String, String> extraMetadata) {
+    _extraMetadata = extraMetadata == null || extraMetadata.isEmpty() ? null : 
extraMetadata;

Review Comment:
   Use `CollectionUtils.isEmpty()`
   
   Not introduced in this PR, but when setting tags, we are not following this 
check. Suggest making them consistent



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