amrishlal commented on a change in pull request #7876:
URL: https://github.com/apache/pinot/pull/7876#discussion_r765016800
##########
File path:
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/creator/JsonIndexCreator.java
##########
@@ -29,7 +29,39 @@
char KEY_VALUE_SEPARATOR = '\0';
/**
- * Adds the next json value.
+ * To be invoked once before each physical JSON document when streaming JSON
into the index
+ * @param numFlattenedDocs the number of flattened documents to be streamed
into the index
+ */
+ default void startDocument(int numFlattenedDocs) {
+ }
+
+ /**
+ * To be invoked after each physical JSON document when streaming JSON into
the index.
+ */
+ default void endDocument() {
+ }
+
+ /**
+ * To be invoked once before each nested (logical) JSON document when
streaming JSON into the index
Review comment:
`flattened` isn't helping here either IMHO. Unless I am missing
something there is no such thing as a `physical`, `nested`, or `flattened` JSON
and use of such terms and interface functions associated with them will only
cause confusion. We just need `start`, `end`, and `add` methods. Anything else
is just very specific to your particular implementation of JSON index and
should not be put at interface level and may not carry over to other
implementations.
--
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]