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

Make JDBC output column labels more human readable

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core, jdbc-adapter
    • Labels:
      None

      Description

      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:

      [deptno, EXPR$1]
      [1, 1]
      [2, 2]
      

      The field name `EXPR$1` can be improved to be more human readable like MySQL client:

      +--------+--------------+
      | deptno | min(e.empid) |
      +--------+--------------+
      |      1 |            1 |
      |      2 |            2 |
      +--------+--------------+
      

       

      PS: the sql statement generating the above outputs:

      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
      
      

        Attachments

          Activity

            People

            • Assignee:
              zhxiaog Xiaoguang Zhang
              Reporter:
              johnzh Xiaoguang zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated: