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


##########
pinot-spi/src/main/java/org/apache/pinot/spi/data/FieldSpec.java:
##########
@@ -535,10 +535,12 @@ protected void appendDefaultNullValue(ObjectNode 
jsonNode) {
           jsonNode.put(key, BytesUtils.toHexString((byte[]) 
_defaultNullValue));
           break;
         case MAP:
-          jsonNode.put(key, JsonUtils.objectToJsonNode(_defaultNullValue));
-          break;
         case LIST:
-          jsonNode.put(key, JsonUtils.objectToJsonNode(_defaultNullValue));
+          try {
+            jsonNode.put(key, JsonUtils.objectToString(_defaultNullValue));

Review Comment:
   Technically we can, but this gives a better exception message, and we can 
short-circuit the object type check



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