[fix](jdbc catalog)fixed oceanbase catalog row limit bug (#19796)
This commit is contained in:
@ -162,7 +162,8 @@ public class JdbcScanNode extends ScanNode {
|
||||
StringBuilder sql = new StringBuilder("SELECT ");
|
||||
|
||||
// Oracle use the where clause to do top n
|
||||
if (shouldPushDownLimit() && jdbcType == TOdbcTableType.ORACLE) {
|
||||
if (shouldPushDownLimit() && (jdbcType == TOdbcTableType.ORACLE
|
||||
|| jdbcType == TOdbcTableType.OCEANBASE_ORACLE)) {
|
||||
filters.add("ROWNUM <= " + limit);
|
||||
}
|
||||
|
||||
@ -187,7 +188,8 @@ public class JdbcScanNode extends ScanNode {
|
||||
|| jdbcType == TOdbcTableType.MONGODB
|
||||
|| jdbcType == TOdbcTableType.CLICKHOUSE
|
||||
|| jdbcType == TOdbcTableType.SAP_HANA
|
||||
|| jdbcType == TOdbcTableType.TRINO)) {
|
||||
|| jdbcType == TOdbcTableType.TRINO
|
||||
|| jdbcType == TOdbcTableType.OCEANBASE)) {
|
||||
sql.append(" LIMIT ").append(limit);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user