You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "xzh_dz (Jira)" <ji...@apache.org> on 2019/12/06 02:33:00 UTC

[jira] [Created] (CALCITE-3572) Lack of Hints information when serialization and deserialization

xzh_dz created CALCITE-3572:
-------------------------------

             Summary: Lack of Hints information when serialization and deserialization
                 Key: CALCITE-3572
                 URL: https://issues.apache.org/jira/browse/CALCITE-3572
             Project: Calcite
          Issue Type: Wish
            Reporter: xzh_dz


when i try to serialization and deserialization hints as below:
{code:java}
@Test public void testExplainTerms() {
  String sql = "select /*+ resource(mem='20Mb') */ empno, ename from emp";
  final RelNode rel = tester.convertSqlToRel(sql).rel;
  RelJsonWriter jsonWriter = new RelJsonWriter();
  if(rel instanceof Project) {
    rel.explain(jsonWriter);
    final String relJson = jsonWriter.asString();
    String s = deserializeAndDumpToTextFormat(getSchema(rel), relJson);
    System.out.println(s);
  }
}
{code}
 

 
{code:java}
{
  "rels": [
    {
      "id": "0",
      "relOp": "LogicalTableScan",
      "table": [
        "CATALOG",
        "SALES",
        "EMP"
      ],
      "inputs": []
    },
    {
      "id": "1",
      "relOp": "LogicalProject",
      "fields": [
        "EMPNO",
        "ENAME"
      ],
      "exprs": [
        {
          "input": 0,
          "name": "$0"
        },
        {
          "input": 1,
          "name": "$1"
        }
      ]
    }
  ]
}
{code}
I find that result lack of the Hints information, maybe we should support Hints serialization and deserialization.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)