You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Chunwei Lei (Jira)" <ji...@apache.org> on 2021/11/17 07:05:00 UTC
[jira] [Resolved] (CALCITE-4884) Provide a new constructor for RelJsonWriter to allow customized JsonBuilder
[ https://issues.apache.org/jira/browse/CALCITE-4884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chunwei Lei resolved CALCITE-4884.
----------------------------------
Fix Version/s: 1.29.0
Resolution: Fixed
Fixed in https://github.com/apache/calcite/commit/faee09f3d014659a024184800070f249b92af662.
> Provide a new constructor for RelJsonWriter to allow customized JsonBuilder
> ---------------------------------------------------------------------------
>
> Key: CALCITE-4884
> URL: https://issues.apache.org/jira/browse/CALCITE-4884
> Project: Calcite
> Issue Type: Improvement
> Reporter: Chunwei Lei
> Assignee: Chunwei Lei
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.29.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Currently JsonBuilder in RelJsonWriter cannot be customized due to it being created in the constructor. We can provide a new constructor for RelJsonWriter to allow customized JsonBuilder.
> {code:java}
> // code placeholder
> public RelJsonWriter() {
> jsonBuilder = new JsonBuilder();
> relList = jsonBuilder.list();
> relJson = new RelJson(jsonBuilder);
> }
> // the new constrctor suggested.
> public RelJsonWriter(JsonBuilder jsonBuilder) {
> this.jsonBuilder = jsonBuilder;
> relList = jsonBuilder.list();
> relJson = new RelJson(jsonBuilder);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)