somandal commented on code in PR #16094:
URL: https://github.com/apache/pinot/pull/16094#discussion_r2198472649
##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/JsonUtils.java:
##########
@@ -734,16 +734,19 @@ private static void addFieldToPinotSchema(Schema
pinotSchema, DataType dataType,
public static List<Map<String, String>> flatten(String jsonString,
JsonIndexConfig jsonIndexConfig)
throws IOException {
JsonNode jsonNode;
+ List<Map<String, String>> flattenedJson;
try {
jsonNode = JsonUtils.stringToJsonNode(jsonString);
- } catch (JsonProcessingException e) {
+ flattenedJson = JsonUtils.flatten(jsonNode, jsonIndexConfig);
Review Comment:
done
##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/JsonUtils.java:
##########
@@ -734,16 +734,19 @@ private static void addFieldToPinotSchema(Schema
pinotSchema, DataType dataType,
public static List<Map<String, String>> flatten(String jsonString,
JsonIndexConfig jsonIndexConfig)
throws IOException {
JsonNode jsonNode;
+ List<Map<String, String>> flattenedJson;
try {
jsonNode = JsonUtils.stringToJsonNode(jsonString);
- } catch (JsonProcessingException e) {
+ flattenedJson = JsonUtils.flatten(jsonNode, jsonIndexConfig);
+ } catch (JsonProcessingException | IllegalArgumentException e) {
Review Comment:
done
##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/creator/JsonIndexCreator.java:
##########
@@ -52,6 +51,12 @@ default void add(Object[] values, @Nullable int[] dictIds) {
void add(String jsonString)
throws IOException;
+ /**
+ * Adds the next json value for Map type
+ */
+ void add(Object jsonMap)
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]