Skip to content

Commit

Permalink
[improve][writer][clickhouse] remove unused variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
wgzhao committed Feb 2, 2024
1 parent 40c9ed9 commit f7119b3
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,11 @@ protected PreparedStatement fillPreparedStatementColumnType(PreparedStatement pr
}

if (columnSqlType == Types.TIMESTAMP) {
String tz;
String columnTypeName = (String) this.resultSetMetaData.get(columnIndex).get("typeName");
if (columnTypeName.startsWith("DateTime64(") && columnTypeName.contains(",")) {
tz = columnTypeName.substring(15, columnTypeName.length() - 2);
preparedStatement.setObject(columnIndex, column.asTimestamp()); //setTimestamp is slow and not recommended
}
else if (columnTypeName.startsWith("DateTime(")) {
tz = columnTypeName.substring(10, columnTypeName.length() - 2);
preparedStatement.setObject(columnIndex, column.asTimestamp());
}
else {
Expand Down

0 comments on commit f7119b3

Please sign in to comment.