You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Haisheng Yuan (Jira)" <ji...@apache.org> on 2019/08/27 20:57:00 UTC
[jira] [Resolved] (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 ]
Haisheng Yuan resolved CALCITE-3295.
------------------------------------
Fix Version/s: 1.21.0
Resolution: Fixed
Fixed in https://github.com/apache/calcite/commit/97d68952d467540cddddbe8350f706028001dfbf, thanks for the PR, [~yanlin-Lynn]!
> 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
> Fix For: 1.21.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> 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)