In spark sql jdbc module, it's using getColumnLabel to get column names from the remote database, but in some databases, like SAS, it returns column description instead. Should getColumnName be used?
This is from the SAS technical support: In the documentation, https://docs.oracle.com/javase/7/docs/api/java/sql/ResultSetMetaData.html (we adhere to the JDBC spec for the driver code ) getColumnLabel() Gets the designated column's suggested title for use in printouts and displays. getColumnName() Get the designated column's name. In the spark code, they use while (i < ncols) { val columnName = rsmd.getColumnLabel(i + 1) The appropriate method should be rsmd.getColumnName(i+1). -- Gary Liu