chunweilei commented on code in PR #2932:
URL: https://github.com/apache/calcite/pull/2932#discussion_r1069024265


##########
core/src/main/java/org/apache/calcite/rel/externalize/RelJson.java:
##########
@@ -122,10 +127,32 @@ public RelJson withInputTranslator(InputTranslator 
inputTranslator) {
     return new RelJson(jsonBuilder, inputTranslator);
   }
 
+  /** Returns a RelJson with a given RelJsonReader. */
+  @SuppressWarnings("initialization.invalid.field.write.initialized")
+  public RelJson withRelJsonReader(@UnknownInitialization RelJsonReader 
relJsonReader) {
+    this.relJsonReader = relJsonReader;
+    return this;
+  }
+
+  /** Returns a RelJson with a given RelJsonWriter. */
+  @SuppressWarnings("initialization.invalid.field.write.initialized")
+  public RelJson withRelJsonWriter(@UnknownInitialization RelJsonWriter 
relJsonWriter) {
+    this.relJsonWriter = relJsonWriter;
+    return this;
+  }
+
   private JsonBuilder jsonBuilder() {
     return requireNonNull(jsonBuilder, "jsonBuilder");
   }
 
+  private RelJsonWriter relJsonWriter() {
+    return requireNonNull(relJsonWriter, "relJsonWriter");
+  }
+
+  private RelJsonReader relJsonReader() {

Review Comment:
   It's a little weird that you add RelJsonWriter and RelJsonReader to RelJson. 
Why RelJson has to use them?



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to