You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2023/01/13 07:27:06 UTC

[GitHub] [calcite] chunweilei commented on a diff in pull request #2932: [CALCITE-5304] RelJson should support RexSubQuery

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-unsubscribe@calcite.apache.org

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