You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by zy...@apache.org on 2023/06/15 06:53:58 UTC

[doris] branch master updated: [improvement](jdbc) support support get mysql information_schema's table and clickhouse system's table (#20768)

This is an automated email from the ASF dual-hosted git repository.

zykkk 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 d9b3c2aba2 [improvement](jdbc) support support get mysql information_schema's table and clickhouse system's table (#20768)
d9b3c2aba2 is described below

commit d9b3c2aba2666153322492116c045412985d08a4
Author: zy-kkk <zh...@gmail.com>
AuthorDate: Thu Jun 15 14:53:51 2023 +0800

    [improvement](jdbc) support support get mysql information_schema's table and clickhouse system's table (#20768)
---
 .../java/org/apache/doris/jdbc/JdbcExecutor.java   | 105 ++++++++++++++++-----
 .../doris/external/jdbc/JdbcClickHouseClient.java  |   5 +
 .../doris/external/jdbc/JdbcMySQLClient.java       |  12 ++-
 .../test_clickhouse_jdbc_catalog.out               | Bin 1439 -> 2586 bytes
 .../jdbc_catalog_p0/test_mysql_jdbc_catalog.out    |  90 +++++++++++++++++-
 .../test_mysql_jdbc_catalog_nereids.out            |  99 +++++++++++++++++--
 .../test_clickhouse_jdbc_catalog.groovy            |   1 +
 .../jdbc_catalog_p0/test_mysql_jdbc_catalog.groovy |   1 +
 .../test_mysql_jdbc_catalog_nereids.groovy         |   1 +
 9 files changed, 274 insertions(+), 40 deletions(-)

diff --git a/fe/be-java-extensions/jdbc-scanner/src/main/java/org/apache/doris/jdbc/JdbcExecutor.java b/fe/be-java-extensions/jdbc-scanner/src/main/java/org/apache/doris/jdbc/JdbcExecutor.java
index 23b30edd6d..b9188b4900 100644
--- a/fe/be-java-extensions/jdbc-scanner/src/main/java/org/apache/doris/jdbc/JdbcExecutor.java
+++ b/fe/be-java-extensions/jdbc-scanner/src/main/java/org/apache/doris/jdbc/JdbcExecutor.java
@@ -47,6 +47,7 @@ import java.math.BigInteger;
 import java.math.RoundingMode;
 import java.net.Inet4Address;
 import java.net.Inet6Address;
+import java.net.InetAddress;
 import java.net.MalformedURLException;
 import java.nio.charset.StandardCharsets;
 import java.sql.Connection;
@@ -393,32 +394,6 @@ public class JdbcExecutor {
         }
     }
 
-    private static final Map<Class<?>, Function<Object, String>> CK_ARRAY_CONVERTERS = new HashMap<>();
-
-    static {
-        CK_ARRAY_CONVERTERS.put(String[].class, res -> Arrays.toString((String[]) res));
-        CK_ARRAY_CONVERTERS.put(boolean[].class, res -> Arrays.toString((boolean[]) res));
-        CK_ARRAY_CONVERTERS.put(byte[].class, res -> Arrays.toString((byte[]) res));
-        CK_ARRAY_CONVERTERS.put(Byte[].class, res -> Arrays.toString((Byte[]) res));
-        CK_ARRAY_CONVERTERS.put(LocalDate[].class, res -> Arrays.toString((LocalDate[]) res));
-        CK_ARRAY_CONVERTERS.put(LocalDateTime[].class, res -> Arrays.toString((LocalDateTime[]) res));
-        CK_ARRAY_CONVERTERS.put(float[].class, res -> Arrays.toString((float[]) res));
-        CK_ARRAY_CONVERTERS.put(double[].class, res -> Arrays.toString((double[]) res));
-        CK_ARRAY_CONVERTERS.put(short[].class, res -> Arrays.toString((short[]) res));
-        CK_ARRAY_CONVERTERS.put(int[].class, res -> Arrays.toString((int[]) res));
-        CK_ARRAY_CONVERTERS.put(long[].class, res -> Arrays.toString((long[]) res));
-        CK_ARRAY_CONVERTERS.put(BigInteger[].class, res -> Arrays.toString((BigInteger[]) res));
-        CK_ARRAY_CONVERTERS.put(BigDecimal[].class, res -> Arrays.toString((BigDecimal[]) res));
-        CK_ARRAY_CONVERTERS.put(Inet4Address[].class, res -> Arrays.toString((Inet4Address[]) res));
-        CK_ARRAY_CONVERTERS.put(Inet6Address[].class, res -> Arrays.toString((Inet6Address[]) res));
-        CK_ARRAY_CONVERTERS.put(UUID[].class, res -> Arrays.toString((UUID[]) res));
-    }
-
-    public static Object convertClickHouseArray(Object obj) {
-        Function<Object, String> converter = CK_ARRAY_CONVERTERS.get(obj.getClass());
-        return converter != null ? converter.apply(obj) : obj;
-    }
-
     private void init(String driverUrl, String sql, int batchSize, String driverClass, String jdbcUrl, String jdbcUser,
             String jdbcPassword, TJdbcOperation op, TOdbcTableType tableType) throws UdfRuntimeException {
         try {
@@ -1641,6 +1616,53 @@ public class JdbcExecutor {
         return hexString.toString();
     }
 
+    private void byteaPutToMySQLString(Object[] column, boolean isNullable, int numRows, long nullMapAddr,
+                                       long offsetsAddr, long charsAddr) {
+        int[] offsets = new int[numRows];
+        byte[][] byteRes = new byte[numRows][];
+        int offset = 0;
+        if (isNullable) {
+            for (int i = 0; i < numRows; i++) {
+                if (column[i] == null) {
+                    byteRes[i] = emptyBytes;
+                    UdfUtils.UNSAFE.putByte(nullMapAddr + i, (byte) 1);
+                } else {
+                    byteRes[i] = mysqlByteArrayToHexString((byte[]) column[i]).getBytes(StandardCharsets.UTF_8);
+                }
+                offset += byteRes[i].length;
+                offsets[i] = offset;
+            }
+        } else {
+            for (int i = 0; i < numRows; i++) {
+                byteRes[i] = mysqlByteArrayToHexString((byte[]) column[i]).getBytes(StandardCharsets.UTF_8);
+                offset += byteRes[i].length;
+                offsets[i] = offset;
+            }
+        }
+        byte[] bytes = new byte[offsets[numRows - 1]];
+        long bytesAddr = JNINativeMethod.resizeStringColumn(charsAddr, offsets[numRows - 1]);
+        int dst = 0;
+        for (int i = 0; i < numRows; i++) {
+            for (int j = 0; j < byteRes[i].length; j++) {
+                bytes[dst++] = byteRes[i][j];
+            }
+        }
+        UdfUtils.copyMemory(offsets, UdfUtils.INT_ARRAY_OFFSET, null, offsetsAddr, numRows * 4L);
+        UdfUtils.copyMemory(bytes, UdfUtils.BYTE_ARRAY_OFFSET, null, bytesAddr, offsets[numRows - 1]);
+    }
+
+    private static String mysqlByteArrayToHexString(byte[] bytes) {
+        StringBuilder hexString = new StringBuilder("0x");
+        for (byte b : bytes) {
+            String hex = Integer.toHexString(0xFF & b);
+            if (hex.length() == 1) {
+                hexString.append('0');
+            }
+            hexString.append(hex);
+        }
+        return hexString.toString();
+    }
+
     public void copyBatchStringResult(Object columnObj, boolean isNullable, int numRows, long nullMapAddr,
             long offsetsAddr, long charsAddr) {
         Object[] column = (Object[]) columnObj;
@@ -1661,6 +1683,9 @@ public class JdbcExecutor {
                 && tableType == TOdbcTableType.CLICKHOUSE) {
             // for clickhouse ipv4 and ipv6 type
             ipPutToString(column, isNullable, numRows, nullMapAddr, offsetsAddr, charsAddr);
+        } else if (column[firstNotNullIndex] instanceof byte[] && tableType == TOdbcTableType.MYSQL) {
+            // for mysql bytea type
+            byteaPutToMySQLString(column, isNullable, numRows, nullMapAddr, offsetsAddr, charsAddr);
         } else {
             // object like in pg type point, polygon, jsonb..... get object is
             // org.postgresql.util.PGobject.....
@@ -1762,6 +1787,34 @@ public class JdbcExecutor {
         }
     }
 
+    private static final Map<Class<?>, Function<Object, String>> CK_ARRAY_CONVERTERS = new HashMap<>();
+
+    static {
+        CK_ARRAY_CONVERTERS.put(String[].class, res -> Arrays.toString((String[]) res));
+        CK_ARRAY_CONVERTERS.put(boolean[].class, res -> Arrays.toString((boolean[]) res));
+        CK_ARRAY_CONVERTERS.put(byte[].class, res -> Arrays.toString((byte[]) res));
+        CK_ARRAY_CONVERTERS.put(Byte[].class, res -> Arrays.toString((Byte[]) res));
+        CK_ARRAY_CONVERTERS.put(LocalDate[].class, res -> Arrays.toString((LocalDate[]) res));
+        CK_ARRAY_CONVERTERS.put(LocalDateTime[].class, res -> Arrays.toString((LocalDateTime[]) res));
+        CK_ARRAY_CONVERTERS.put(float[].class, res -> Arrays.toString((float[]) res));
+        CK_ARRAY_CONVERTERS.put(double[].class, res -> Arrays.toString((double[]) res));
+        CK_ARRAY_CONVERTERS.put(short[].class, res -> Arrays.toString((short[]) res));
+        CK_ARRAY_CONVERTERS.put(int[].class, res -> Arrays.toString((int[]) res));
+        CK_ARRAY_CONVERTERS.put(long[].class, res -> Arrays.toString((long[]) res));
+        CK_ARRAY_CONVERTERS.put(BigInteger[].class, res -> Arrays.toString((BigInteger[]) res));
+        CK_ARRAY_CONVERTERS.put(BigDecimal[].class, res -> Arrays.toString((BigDecimal[]) res));
+        CK_ARRAY_CONVERTERS.put(Inet4Address[].class, res -> Arrays.toString(Arrays.stream((Inet4Address[]) res)
+                .map(InetAddress::getHostAddress).toArray(String[]::new)));
+        CK_ARRAY_CONVERTERS.put(Inet6Address[].class, res -> Arrays.toString(Arrays.stream((Inet6Address[]) res)
+                .map(addr -> simplifyIPv6Address(addr.getHostAddress())).toArray(String[]::new)));
+        CK_ARRAY_CONVERTERS.put(UUID[].class, res -> Arrays.toString((UUID[]) res));
+    }
+
+    public static Object convertClickHouseArray(Object obj) {
+        Function<Object, String> converter = CK_ARRAY_CONVERTERS.get(obj.getClass());
+        return converter != null ? converter.apply(obj) : obj;
+    }
+
     private void ckArrayPutToString(Object[] column, boolean isNullable, int numRows, long nullMapAddr,
             long offsetsAddr, long charsAddr) {
         int[] offsets = new int[numRows];
diff --git a/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClickHouseClient.java b/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClickHouseClient.java
index 794fb868ff..956e127405 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClickHouseClient.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcClickHouseClient.java
@@ -32,6 +32,11 @@ public class JdbcClickHouseClient extends JdbcClient {
         return "SHOW DATABASES";
     }
 
+    @Override
+    protected String[] getTableTypes() {
+        return new String[] {"TABLE", "VIEW", "SYSTEM TABLE"};
+    }
+
     @Override
     protected Type jdbcTypeToDoris(JdbcFieldSchema fieldSchema) {
 
diff --git a/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcMySQLClient.java b/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcMySQLClient.java
index 377b92843b..557c2703a5 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcMySQLClient.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/external/jdbc/JdbcMySQLClient.java
@@ -74,6 +74,11 @@ public class JdbcMySQLClient extends JdbcClient {
         }
     }
 
+    @Override
+    protected String[] getTableTypes() {
+        return new String[] {"TABLE", "VIEW", "SYSTEM VIEW"};
+    }
+
     @Override
     protected ResultSet getColumns(DatabaseMetaData databaseMetaData, String catalogName, String schemaName,
                                    String tableName) throws SQLException {
@@ -251,6 +256,12 @@ public class JdbcMySQLClient extends JdbcClient {
                 return charType;
             case "VARCHAR":
                 return ScalarType.createVarcharType(fieldSchema.columnSize);
+            case "BIT":
+                if (fieldSchema.getColumnSize() == 1) {
+                    return Type.BOOLEAN;
+                } else {
+                    return ScalarType.createStringType();
+                }
             case "TIME":
             case "TINYTEXT":
             case "TEXT":
@@ -266,7 +277,6 @@ public class JdbcMySQLClient extends JdbcClient {
             case "LONGSTRING":
             case "JSON":
             case "SET":
-            case "BIT":
             case "BINARY":
             case "VARBINARY":
             case "ENUM":
diff --git a/regression-test/data/jdbc_catalog_p0/test_clickhouse_jdbc_catalog.out b/regression-test/data/jdbc_catalog_p0/test_clickhouse_jdbc_catalog.out
index 26446a54e7..8a50ed5c09 100644
Binary files a/regression-test/data/jdbc_catalog_p0/test_clickhouse_jdbc_catalog.out and b/regression-test/data/jdbc_catalog_p0/test_clickhouse_jdbc_catalog.out differ
diff --git a/regression-test/data/jdbc_catalog_p0/test_mysql_jdbc_catalog.out b/regression-test/data/jdbc_catalog_p0/test_mysql_jdbc_catalog.out
index 8cb2b59185..d268b47efa 100644
--- a/regression-test/data/jdbc_catalog_p0/test_mysql_jdbc_catalog.out
+++ b/regression-test/data/jdbc_catalog_p0/test_mysql_jdbc_catalog.out
@@ -165,6 +165,87 @@ bca	2022-11-02	2022-11-02	8012	vivo
 1.12345	1.12345	1.12345	1.12345	1.12345	1.12345
 123456789012345678901234567890123.12345	12345678901234567890123456789012.12345	1234567890123456789012345678901234.12345	123456789012345678901234567890123.12345	123456789012345678901234567890123456789012345678901234567890.12345	123456789012345678901234567890123456789012345678901234567890.12345
 
+-- !information_schema --
+ADMINISTRABLE_ROLE_AUTHORIZATIONS
+APPLICABLE_ROLES
+CHARACTER_SETS
+CHECK_CONSTRAINTS
+COLLATIONS
+COLLATION_CHARACTER_SET_APPLICABILITY
+COLUMNS
+COLUMNS_EXTENSIONS
+COLUMN_PRIVILEGES
+COLUMN_STATISTICS
+ENABLED_ROLES
+ENGINES
+EVENTS
+FILES
+INNODB_BUFFER_PAGE
+INNODB_BUFFER_PAGE_LRU
+INNODB_BUFFER_POOL_STATS
+INNODB_CACHED_INDEXES
+INNODB_CMP
+INNODB_CMPMEM
+INNODB_CMPMEM_RESET
+INNODB_CMP_PER_INDEX
+INNODB_CMP_PER_INDEX_RESET
+INNODB_CMP_RESET
+INNODB_COLUMNS
+INNODB_DATAFILES
+INNODB_FIELDS
+INNODB_FOREIGN
+INNODB_FOREIGN_COLS
+INNODB_FT_BEING_DELETED
+INNODB_FT_CONFIG
+INNODB_FT_DEFAULT_STOPWORD
+INNODB_FT_DELETED
+INNODB_FT_INDEX_CACHE
+INNODB_FT_INDEX_TABLE
+INNODB_INDEXES
+INNODB_METRICS
+INNODB_SESSION_TEMP_TABLESPACES
+INNODB_TABLES
+INNODB_TABLESPACES
+INNODB_TABLESPACES_BRIEF
+INNODB_TABLESTATS
+INNODB_TEMP_TABLE_INFO
+INNODB_TRX
+INNODB_VIRTUAL
+KEYWORDS
+KEY_COLUMN_USAGE
+OPTIMIZER_TRACE
+PARAMETERS
+PARTITIONS
+PLUGINS
+PROCESSLIST
+PROFILING
+REFERENTIAL_CONSTRAINTS
+RESOURCE_GROUPS
+ROLE_COLUMN_GRANTS
+ROLE_ROUTINE_GRANTS
+ROLE_TABLE_GRANTS
+ROUTINES
+SCHEMATA
+SCHEMATA_EXTENSIONS
+SCHEMA_PRIVILEGES
+STATISTICS
+ST_GEOMETRY_COLUMNS
+ST_SPATIAL_REFERENCE_SYSTEMS
+ST_UNITS_OF_MEASURE
+TABLES
+TABLESPACES
+TABLESPACES_EXTENSIONS
+TABLES_EXTENSIONS
+TABLE_CONSTRAINTS
+TABLE_CONSTRAINTS_EXTENSIONS
+TABLE_PRIVILEGES
+TRIGGERS
+USER_ATTRIBUTES
+USER_PRIVILEGES
+VIEWS
+VIEW_ROUTINE_USAGE
+VIEW_TABLE_USAGE
+
 -- !test_insert1 --
 doris1	18
 
@@ -200,7 +281,8 @@ sys
 {"k1":"v1", "k2":"v2"}
 
 -- !mysql_all_types --
-\N      302     \N      502     602     4.14159 \N      6.14159 \N      -124    -302    2013    -402    -502    -602    \N      2012-10-26T02:08:39.345700      2013-10-26T08:09:18     -5.14145        \N      -7.1400 row2    \N      09:11:09.567    text2   \\xe86f6c6c6f20576f726c67       \N      \N      \\x2f   \N      \\x88656c6c9f   Value3
-201     301     401     501     601     3.14159 4.1415926       5.14159 true    -123    -301    2012    -401    -501    -601    2012-10-30      2012-10-25T12:05:36.345700      2012-10-25T08:08:08     -4.14145        -5.1400000001   -6.1400 row1    line1   09:09:09.567    text1   \\x48656c6c6f20576f726c64       {"age": 30, "city": "London", "name": "Alice"}  Option1,Option3 \\x2a   \\x48656c6c6f00000000000000     \\x48656c6c6f   Value2
-202     302     402     502     602     4.14159 5.1415926       6.14159 false   -124    -302    2013    -402    -502    -602    2012-11-01      2012-10-26T02:08:39.345700      2013-10-26T08:09:18     -5.14145        -6.1400000001   -7.1400 row2    line2   09:11:09.567    text2   \\xe86f6c6c6f20576f726c67       {"age": 18, "city": "ChongQing", "name": "Gaoxin"}      Option1,Option2 \\x2f   \\x58676c6c6f00000000000000     \\x88656c6c9f   Value3
-203     303     403     503     603     7.14159 8.1415926       9.14159 false   \N      -402    2017    -602    -902    -1102   2012-11-02      2023-05-22T16:01:20.063700      2013-10-27T08:11:18     -5.14145        -6.1400000000001        -7.1400 row3    line3   09:11:09.567    text3   \\xe86f6c6c6f20576f726c67       {"age": 24, "city": "ChongQing", "name": "ChenQi"}      Option2 \\x2f   \\x58676c6c6f00000000000000     \N      Value1
+\N	302	\N	502	602	4.14159	\N	6.14159	\N	-124	-302	2013	-402	-502	-602	\N	2012-10-26T02:08:39.345700	2013-10-26T08:09:18	-5.14145	\N	-7.1400	row2	\N	09:11:09.567	text2	0xe86f6c6c6f20576f726c67	\N	\N	0x2f	\N	0x88656c6c9f	Value3
+201	301	401	501	601	3.14159	4.1415926	5.14159	true	-123	-301	2012	-401	-501	-601	2012-10-30	2012-10-25T12:05:36.345700	2012-10-25T08:08:08	-4.14145	-5.1400000001	-6.1400	row1	line1	09:09:09.567	text1	0x48656c6c6f20576f726c64	{"age": 30, "city": "London", "name": "Alice"}	Option1,Option3	0x2a	0x48656c6c6f00000000000000	0x48656c6c6f	Value2
+202	302	402	502	602	4.14159	5.1415926	6.14159	false	-124	-302	2013	-402	-502	-602	2012-11-01	2012-10-26T02:08:39.345700	2013-10-26T08:09:18	-5.14145	-6.1400000001	-7.1400	row2	line2	09:11:09.567	text2	0xe86f6c6c6f20576f726c67	{"age": 18, "city": "ChongQing", "name": "Gaoxin"}	Option1,Option2	0x2f	0x58676c6c6f00000000000000	0x88656c6c9f	Value3
+203	303	403	503	603	7.14159	8.1415926	9.14159	false	\N	-402	2017	-602	-902	-1102	2012-11-02	\N	2013-10-27T08:11:18	-5.14145	-6.1400000000001	-7.1400	row3	line3	09:11:09.567	text3	0xe86f6c6c6f20576f726c67	{"age": 24, "city": "ChongQing", "name": "ChenQi"}	Option2	0x2f	0x58676c6c6f00000000000000	\N	Value1
+
diff --git a/regression-test/data/jdbc_catalog_p0/test_mysql_jdbc_catalog_nereids.out b/regression-test/data/jdbc_catalog_p0/test_mysql_jdbc_catalog_nereids.out
index 7b1a18c3a9..78eb61a46b 100644
--- a/regression-test/data/jdbc_catalog_p0/test_mysql_jdbc_catalog_nereids.out
+++ b/regression-test/data/jdbc_catalog_p0/test_mysql_jdbc_catalog_nereids.out
@@ -72,14 +72,14 @@ b	1
 c	1
 
 -- !ex_tb13 --
-张三0	11	1234567	123	321312	1999-02-13T00:00	中国	男	0
-张三1	11	12345678	123	321312	1999-02-13T00:00	中国	男	0
-张三2	11	12345671	123	321312	1999-02-13T00:00	中国	男	0
-张三3	11	12345673	123	321312	1999-02-13T00:00	中国	男	0
-张三4	11	123456711	123	321312	1999-02-13T00:00	中国	男	0
-张三5	11	1232134567	123	321312	1999-02-13T00:00	中国	男	0
-张三6	11	124314567	123	321312	1999-02-13T00:00	中国	男	0
-张三7	11	123445167	123	321312	1998-02-13T00:00	中国	男	0
+张三0	11	1234567	123	321312	1999-02-13T00:00	中国	男	false
+张三1	11	12345678	123	321312	1999-02-13T00:00	中国	男	false
+张三2	11	12345671	123	321312	1999-02-13T00:00	中国	男	false
+张三3	11	12345673	123	321312	1999-02-13T00:00	中国	男	false
+张三4	11	123456711	123	321312	1999-02-13T00:00	中国	男	false
+张三5	11	1232134567	123	321312	1999-02-13T00:00	中国	男	false
+张三6	11	124314567	123	321312	1999-02-13T00:00	中国	男	false
+张三7	11	123445167	123	321312	1998-02-13T00:00	中国	男	false
 
 -- !ex_tb14 --
 123	2022-11-02	2022-11-02	8011	oppo
@@ -156,6 +156,87 @@ bca	2022-11-02	2022-11-02	8012	vivo
 1.12345	1.12345	1.12345	1.12345	1.12345	1.12345
 123456789012345678901234567890123.12345	12345678901234567890123456789012.12345	1234567890123456789012345678901234.12345	123456789012345678901234567890123.12345	123456789012345678901234567890123456789012345678901234567890.12345	123456789012345678901234567890123456789012345678901234567890.12345
 
+-- !information_schema --
+ADMINISTRABLE_ROLE_AUTHORIZATIONS
+APPLICABLE_ROLES
+CHARACTER_SETS
+CHECK_CONSTRAINTS
+COLLATIONS
+COLLATION_CHARACTER_SET_APPLICABILITY
+COLUMNS
+COLUMNS_EXTENSIONS
+COLUMN_PRIVILEGES
+COLUMN_STATISTICS
+ENABLED_ROLES
+ENGINES
+EVENTS
+FILES
+INNODB_BUFFER_PAGE
+INNODB_BUFFER_PAGE_LRU
+INNODB_BUFFER_POOL_STATS
+INNODB_CACHED_INDEXES
+INNODB_CMP
+INNODB_CMPMEM
+INNODB_CMPMEM_RESET
+INNODB_CMP_PER_INDEX
+INNODB_CMP_PER_INDEX_RESET
+INNODB_CMP_RESET
+INNODB_COLUMNS
+INNODB_DATAFILES
+INNODB_FIELDS
+INNODB_FOREIGN
+INNODB_FOREIGN_COLS
+INNODB_FT_BEING_DELETED
+INNODB_FT_CONFIG
+INNODB_FT_DEFAULT_STOPWORD
+INNODB_FT_DELETED
+INNODB_FT_INDEX_CACHE
+INNODB_FT_INDEX_TABLE
+INNODB_INDEXES
+INNODB_METRICS
+INNODB_SESSION_TEMP_TABLESPACES
+INNODB_TABLES
+INNODB_TABLESPACES
+INNODB_TABLESPACES_BRIEF
+INNODB_TABLESTATS
+INNODB_TEMP_TABLE_INFO
+INNODB_TRX
+INNODB_VIRTUAL
+KEYWORDS
+KEY_COLUMN_USAGE
+OPTIMIZER_TRACE
+PARAMETERS
+PARTITIONS
+PLUGINS
+PROCESSLIST
+PROFILING
+REFERENTIAL_CONSTRAINTS
+RESOURCE_GROUPS
+ROLE_COLUMN_GRANTS
+ROLE_ROUTINE_GRANTS
+ROLE_TABLE_GRANTS
+ROUTINES
+SCHEMATA
+SCHEMATA_EXTENSIONS
+SCHEMA_PRIVILEGES
+STATISTICS
+ST_GEOMETRY_COLUMNS
+ST_SPATIAL_REFERENCE_SYSTEMS
+ST_UNITS_OF_MEASURE
+TABLES
+TABLESPACES
+TABLESPACES_EXTENSIONS
+TABLES_EXTENSIONS
+TABLE_CONSTRAINTS
+TABLE_CONSTRAINTS_EXTENSIONS
+TABLE_PRIVILEGES
+TRIGGERS
+USER_ATTRIBUTES
+USER_PRIVILEGES
+VIEWS
+VIEW_ROUTINE_USAGE
+VIEW_TABLE_USAGE
+
 -- !test_insert1 --
 doris1	18
 
@@ -170,7 +251,7 @@ doris3	20
 doris3	20
 
 -- !test_insert4 --
-1	abcHa1.12345	1.123450xkalowadawd	2022-10-01	3.14159	1	2	0	100000	1.2345678	24.000	07:09:51	2022	2022-11-27T07:09:51	2022-11-27T07:09:51
+true	abcHa1.12345	1.123450xkalowadawd	2022-10-01	3.14159	1	2	0	100000	1.2345678	24.000	07:09:51	2022	2022-11-27T07:09:51	2022-11-27T07:09:51
 
 -- !ex_tb1 --
 {"k1":"v1", "k2":"v2"}
diff --git a/regression-test/suites/jdbc_catalog_p0/test_clickhouse_jdbc_catalog.groovy b/regression-test/suites/jdbc_catalog_p0/test_clickhouse_jdbc_catalog.groovy
index d2f67340e3..4d3dec95f5 100644
--- a/regression-test/suites/jdbc_catalog_p0/test_clickhouse_jdbc_catalog.groovy
+++ b/regression-test/suites/jdbc_catalog_p0/test_clickhouse_jdbc_catalog.groovy
@@ -54,6 +54,7 @@ suite("test_clickhouse_jdbc_catalog", "p0") {
         order_qt_arr  """ select * from arr order by id; """
         sql  """ insert into internal.${internal_db_name}.${inDorisTable} select * from student; """
         order_qt_in_tb  """ select id, name, age from internal.${internal_db_name}.${inDorisTable} order by id; """
+        order_qt_system  """ show tables from `system`; """
 
         sql """ drop catalog if exists ${catalog_name} """
     }
diff --git a/regression-test/suites/jdbc_catalog_p0/test_mysql_jdbc_catalog.groovy b/regression-test/suites/jdbc_catalog_p0/test_mysql_jdbc_catalog.groovy
index e5ef743a9c..8d4b328b86 100644
--- a/regression-test/suites/jdbc_catalog_p0/test_mysql_jdbc_catalog.groovy
+++ b/regression-test/suites/jdbc_catalog_p0/test_mysql_jdbc_catalog.groovy
@@ -98,6 +98,7 @@ suite("test_mysql_jdbc_catalog", "p0") {
         order_qt_ex_tb18  """ select * from ${ex_tb18} order by num_tinyint; """
         order_qt_ex_tb19  """ select * from ${ex_tb19} order by date_value; """
         order_qt_ex_tb20  """ select * from ${ex_tb20} order by decimal_normal; """
+        order_qt_information_schema """ show tables from information_schema; """
 
         // test insert
         String uuid1 = UUID.randomUUID().toString();
diff --git a/regression-test/suites/jdbc_catalog_p0/test_mysql_jdbc_catalog_nereids.groovy b/regression-test/suites/jdbc_catalog_p0/test_mysql_jdbc_catalog_nereids.groovy
index 5b23fc51da..a258f4d4f6 100644
--- a/regression-test/suites/jdbc_catalog_p0/test_mysql_jdbc_catalog_nereids.groovy
+++ b/regression-test/suites/jdbc_catalog_p0/test_mysql_jdbc_catalog_nereids.groovy
@@ -98,6 +98,7 @@ suite("test_mysql_jdbc_catalog_nereids", "p0") {
         order_qt_ex_tb18  """ select * from ${ex_tb18} order by num_tinyint; """
         order_qt_ex_tb19  """ select * from ${ex_tb19} order by date_value; """
         order_qt_ex_tb20  """ select * from ${ex_tb20} order by decimal_normal; """
+        order_qt_information_schema """ show tables from information_schema; """
 
         // test insert
         String uuid1 = UUID.randomUUID().toString();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org