Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3295

Aggregate call name lost in serialized json string.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.21.0
    • None

    Description

      When serialize a relnode to json string, the name of aggregate call was lost.
      For a sql string like this

      SELECT max(SAL) as max_sal from EMP group by JOB;
      

      The serialized json string is like this

      {
        "rels": [
          {
            "id": "0",
            "relOp": "LogicalTableScan",
            "table": [
              "scott",
              "EMP"
            ],
            "inputs": []
          },
          {
            "id": "1",
            "relOp": "LogicalProject",
            "fields": [
              "JOB",
              "SAL"
            ],
            "exprs": [
              {
                "input": 2,
                "name": "$2"
              },
              {
                "input": 5,
                "name": "$5"
              }
            ]
          },
          {
            "id": "2",
            "relOp": "LogicalAggregate",
            "group": [
              0
            ],
            "aggs": [
              {
                "agg": {
                  "name": "MAX",
                  "kind": "MAX",
                  "syntax": "FUNCTION"
                },
                "type": {
                  "type": "DECIMAL",
                  "nullable": true,
                  "precision": 7,
                  "scale": 2
                },
                "distinct": false,
                "operands": [
                  1
                ],
              }
            ]
          },
          {
            "id": "3",
            "relOp": "LogicalProject",
            "fields": [
              "max_sal"
            ],
            "exprs": [
              {
                "input": 1,
                "name": "$1"
              }
            ]
          }
        ]
      }
      

      Lost the name of max call.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yanlin-Lynn Wang Yanlin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h