Skip to content

Commit

Permalink
[Hotfix][Connector-V2][Jdbc] Field aliases are not supported in the q…
Browse files Browse the repository at this point in the history
…uery of jdbc source. (apache#4158) (apache#4210)

* [Bug][Connector-V2] Field aliases are not supported in the query of jdbc source. (apache#4158)

* [Bug][Connector-V2] Field aliases are not supported in the query of jdbc source. (apache#4158)

---------

Co-authored-by: HuPC <[email protected]>
  • Loading branch information
2 people authored and hailin0 committed Mar 23, 2023
1 parent 00b9696 commit 36586c9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ private SeaTunnelRowType initTableField(Connection conn) {
ResultSetMetaData resultSetMetaData =
jdbcDialect.getResultSetMetaData(conn, jdbcSourceConfig);
for (int i = 1; i <= resultSetMetaData.getColumnCount(); i++) {
fieldNames.add(resultSetMetaData.getColumnName(i));
// Support AS syntax
fieldNames.add(resultSetMetaData.getColumnLabel(i));
seaTunnelDataTypes.add(jdbcDialectTypeMapper.mapping(resultSetMetaData, i));
}
} catch (Exception e) {
Expand Down

0 comments on commit 36586c9

Please sign in to comment.