This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new b2b0dae8963 branch-3.0: [Fix](TrinoConnector) it will return error
when query `information_schema.tables` within `trino-connector` catalog #49912
(#50006)
b2b0dae8963 is described below
commit b2b0dae8963fa8398c575135af1dbb33bd5c4526
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Apr 23 11:56:30 2025 +0800
branch-3.0: [Fix](TrinoConnector) it will return error when query
`information_schema.tables` within `trino-connector` catalog #49912 (#50006)
Cherry-picked from #49912
Co-authored-by: Tiewei Fang <[email protected]>
---
.../java/org/apache/doris/catalog/TableIf.java | 1 +
.../test_trinoconnector_information_schema.groovy | 44 ++++++++++++++++++++++
2 files changed, 45 insertions(+)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/TableIf.java
b/fe/fe-core/src/main/java/org/apache/doris/catalog/TableIf.java
index 32d4bf79a7a..c185284744e 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/TableIf.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/TableIf.java
@@ -461,6 +461,7 @@ public interface TableIf {
case ICEBERG_EXTERNAL_TABLE:
case PAIMON_EXTERNAL_TABLE:
case MATERIALIZED_VIEW:
+ case TRINO_CONNECTOR_EXTERNAL_TABLE:
return "BASE TABLE";
default:
return null;
diff --git
a/regression-test/suites/external_table_p0/trino_connector/test_trinoconnector_information_schema.groovy
b/regression-test/suites/external_table_p0/trino_connector/test_trinoconnector_information_schema.groovy
new file mode 100644
index 00000000000..76465e4cd78
--- /dev/null
+++
b/regression-test/suites/external_table_p0/trino_connector/test_trinoconnector_information_schema.groovy
@@ -0,0 +1,44 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("test_trinoconnector_information_schema",
"p0,external,hive,external_docker,external_docker_hive") {
+ String enabled = context.config.otherConfigs.get("enableHiveTest")
+ if (enabled != null && enabled.equalsIgnoreCase("true")) {
+ def host_ips = new ArrayList()
+ String[][] backends = sql """ show backends """
+ for (def b in backends) {
+ host_ips.add(b[1])
+ }
+ String [][] frontends = sql """ show frontends """
+ for (def f in frontends) {
+ host_ips.add(f[1])
+ }
+ dispatchTrinoConnectors(host_ips.unique())
+ String hms_port = context.config.otherConfigs.get("hive2HmsPort")
+ String catalog_name = "test_trinoconnector_information_schema"
+ String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
+
+ sql """drop catalog if exists ${catalog_name}"""
+ sql """create catalog if not exists ${catalog_name} properties (
+ "type"="trino-connector",
+ "trino.connector.name"="hive",
+ 'trino.hive.metastore.uri' =
'thrift://${externalEnvIp}:${hms_port}'
+ );"""
+
+ sql """ select * from ${catalog_name}.information_schema.tables limit
10""";
+ }
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]