Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-13306

[Java][JDBC] use ResultSetMetaData.getColumnLabel instead of ResultSetMetaData.getColumnName

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 5.0.0
    • Java

    Description

      when using JDBC to Arrow utils, sometimes, column alias can not be displayed in final arrow results. 

      For example, here is a result set from query 

      SELECT col AS a FROM table

      postgres can works properly, arrow result schema contains "a", but mysql arrow result schema contains "col".

      This is because postgres use field label as column name and column label (postgres jdbc), but mysql use column name as label, original column name as name (mysql jdbc).

      Maybe "getColumnLabel" is more fittable for arrow results, instead of "getColumnName".

      Attachments

        Issue Links

          Activity

            People

              NinaPeng Jiangtao Peng
              NinaPeng Jiangtao Peng
              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 - 2.5h
                  2.5h