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

[jira] [Updated] (CALCITE-3295) Aggregate call name lost in serialized json string.

     [ https://issues.apache.org/jira/browse/CALCITE-3295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated CALCITE-3295:
------------------------------------
    Labels: pull-request-available  (was: )

> Aggregate call name lost in serialized json string.
> ---------------------------------------------------
>
>                 Key: CALCITE-3295
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3295
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Wang Yanlin
>            Priority: Major
>              Labels: pull-request-available
>
> When serialize a relnode to json string, the name of aggregate call was lost.
>  For a sql string like this
> {code:java}
> SELECT max(SAL) as max_sal from EMP group by JOB;
> {code}
> The serialized json string is like this
> {code:java}
> {
>   "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"
>         }
>       ]
>     }
>   ]
> }
> {code}
> Lost the name of max call.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)