This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new f2b2a568de [fix](jdbc catalog)fixed oceanbase catalog row limit bug
(#19796)
f2b2a568de is described below
commit f2b2a568def6fc7481b38d495c21089d612c2ca1
Author: yongkang.zhong <[email protected]>
AuthorDate: Thu May 18 22:05:51 2023 +0800
[fix](jdbc catalog)fixed oceanbase catalog row limit bug (#19796)
---
fe/fe-core/src/main/java/org/apache/doris/planner/JdbcScanNode.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/planner/JdbcScanNode.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/JdbcScanNode.java
index e718bad667..c839d5ea95 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/JdbcScanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/JdbcScanNode.java
@@ -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);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]