Skip to content

Commit

Permalink
[3.0][fix](oracle scan) Fix performance issues caused by version judg…
Browse files Browse the repository at this point in the history
…ment (#41513)

pick (#41407)
  • Loading branch information
zy-kkk authored Oct 1, 2024
1 parent 04e842d commit d61a23d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@
public class OracleJdbcExecutor extends BaseJdbcExecutor {
private static final Logger LOG = Logger.getLogger(OracleJdbcExecutor.class);
private final CharsetDecoder utf8Decoder = StandardCharsets.UTF_8.newDecoder();
private final boolean isNewJdbcVersion;

public OracleJdbcExecutor(byte[] thriftParams) throws Exception {
super(thriftParams);
isNewJdbcVersion = isJdbcVersionGreaterThanOrEqualTo("12.2.0");
}

@Override
Expand All @@ -65,7 +67,7 @@ protected void initializeBlock(int columnCount, String[] replaceStringList, int

@Override
protected Object getColumnValue(int columnIndex, ColumnType type, String[] replaceStringList) throws SQLException {
if (isJdbcVersionGreaterThanOrEqualTo("12.2.0")) {
if (isNewJdbcVersion) {
return newGetColumnValue(columnIndex, type, replaceStringList);
} else {
return oldGetColumnValue(columnIndex, type, replaceStringList);
Expand Down

0 comments on commit d61a23d

Please sign in to comment.