This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 6b96d0e8d6 [branch-2.0][fix](jdbc catalog) Use String to map Json
types (#24718)
6b96d0e8d6 is described below
commit 6b96d0e8d66d63fec24e942067a1d012856d7580
Author: zy-kkk <[email protected]>
AuthorDate: Thu Sep 21 17:24:43 2023 +0800
[branch-2.0][fix](jdbc catalog) Use String to map Json types (#24718)
---
.../org/apache/doris/datasource/jdbc/client/JdbcMySQLClient.java | 8 +++++---
.../apache/doris/datasource/jdbc/client/JdbcPostgreSQLClient.java | 5 +++--
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcMySQLClient.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcMySQLClient.java
index da178b6f81..a7faa42154 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcMySQLClient.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcMySQLClient.java
@@ -296,8 +296,9 @@ public class JdbcMySQLClient extends JdbcClient {
} else {
return ScalarType.createStringType();
}
+ // For Json Type in Doris 2.0,
+ // we need to use a String mapping because the new optimizer
doesn't support Json
case "JSON":
- return ScalarType.createJsonbType();
case "TIME":
case "TINYTEXT":
case "TEXT":
@@ -415,9 +416,10 @@ public class JdbcMySQLClient extends JdbcClient {
}
case "STRING":
case "TEXT":
- return ScalarType.createStringType();
+ // For Json Type in Doris 2.0,
+ // we need to use a String mapping because the new optimizer
doesn't support Json
case "JSON":
- return ScalarType.createJsonbType();
+ return ScalarType.createStringType();
case "HLL":
return ScalarType.createHllType();
case "BITMAP":
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcPostgreSQLClient.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcPostgreSQLClient.java
index 7fe1803ad5..926de8d46c 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcPostgreSQLClient.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/datasource/jdbc/client/JdbcPostgreSQLClient.java
@@ -101,10 +101,11 @@ public class JdbcPostgreSQLClient extends JdbcClient {
case "varbit":
case "uuid":
case "bytea":
- return ScalarType.createStringType();
+ // For Json Type in Doris 2.0,
+ // we need to use a String mapping because the new optimizer
doesn't support Json
case "json":
case "jsonb":
- return ScalarType.createJsonbType();
+ return ScalarType.createStringType();
default:
return Type.UNSUPPORTED;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]