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

john zh updated CALCITE-3261:
-----------------------------
    Description: 
After implementing the missing `print(ResultSet)` method from the examples in 
[Calcite|http://example.com] 
[tutorial|[https://calcite.apache.org/docs/index.html]], I found that the 
output field names are incorrect:
{code}
[deptno, EXPR$1]
[1, 1]
[2, 2]
{code}
The field name `EXPR$1` can be improved to be more human readable like MySQL:
{code}
+--------+--------------+
| deptno | min(e.empid) |
+--------+--------------+
|      1 |            1 |
|      2 |            2 |
+--------+--------------+
{code}
 

PS: the sql statement generating the above outputs:
{code:sql}
select d.deptno, min(e.empid) from hr.emps as e join hr.depts as d on e.deptno 
= d.deptno group by d.deptno having count(*) > 1

{code}

  was:
After implementing the missing `print(ResultSet)` method from the examples in 
Calcite [tutorial|[https://calcite.apache.org/docs/index.html]], I found that 
the output field names are incorrect:
{code:sh}
[deptno, EXPR$1]
[1, 1]
[2, 2]
{code}
The field name `EXPR$1` can be improved to be more human readable like MySQL:
{code:sh}
+--------+--------------+
| deptno | min(e.empid) |
+--------+--------------+
|      1 |            1 |
|      2 |            2 |
+--------+--------------+
{code}
 

PS: the sql statement generating the above outputs:
{code:sql}
select d.deptno, min(e.empid) from hr.emps as e join hr.depts as d on e.deptno 
= d.deptno group by d.deptno having count(*) > 1

{code}


> Incorrect output field names from jdbc
> --------------------------------------
>
>                 Key: CALCITE-3261
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3261
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core, jdbc-adapter
>            Reporter: john zh
>            Priority: Major
>
> After implementing the missing `print(ResultSet)` method from the examples in 
> [Calcite|http://example.com] 
> [tutorial|[https://calcite.apache.org/docs/index.html]], I found that the 
> output field names are incorrect:
> {code}
> [deptno, EXPR$1]
> [1, 1]
> [2, 2]
> {code}
> The field name `EXPR$1` can be improved to be more human readable like MySQL:
> {code}
> +--------+--------------+
> | deptno | min(e.empid) |
> +--------+--------------+
> |      1 |            1 |
> |      2 |            2 |
> +--------+--------------+
> {code}
>  
> PS: the sql statement generating the above outputs:
> {code:sql}
> select d.deptno, min(e.empid) from hr.emps as e join hr.depts as d on 
> e.deptno = d.deptno group by d.deptno having count(*) > 1
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to