Gabriel39 commented on code in PR #70176:
URL: https://github.com/apache/doris/pull/70176#discussion_r4637467286
##########
fe/fe-core/src/main/java/org/apache/doris/arrowflight/FlightSqlSchemaHelper.java:
##########
@@ -168,7 +168,7 @@ protected static byte[] getSerializedSchema(List<Field>
fields) {
*/
public void setParameterForGetTables(CommandGetTables command) {
includeSchema = command.getIncludeSchema();
- catalogFilterPattern = command.hasCatalog() ? command.getCatalog() :
"internal";
+ catalogFilterPattern = command.hasCatalog() ? command.getCatalog() :
null;
Review Comment:
Addressed by the raw-name service path: Flight calls getDbNames(params,
false), so both schema-pattern matching and emitted schema names use the raw
database name. The legacy Thrift entry retains MySQL display names. The rebase
also preserves master's RPC identity and authenticated-role propagation.
Coverage exercises both display settings and catalog-filter modes.
##########
fe/fe-connector/fe-connector-adbc/src/main/java/org/apache/doris/connector/adbc/AdbcClient.java:
##########
@@ -121,6 +134,69 @@ public <T> T withConnection(AdbcConnectionCall<T> body) {
}
}
+ /** The remote identity, shared by metadata routing and automatic SQL
dialect selection. */
+ Optional<String> vendorName() {
+ Optional<String> known = vendorName.get();
+ if (known != null) {
+ return known;
+ }
+ synchronized (DRIVER_INFO_LOCK) {
Review Comment:
Addressed in the native driver rather than relying on the Java probe lock.
Each connection clones immutable driver defaults before preparing server
information, so ordinary connection-open readers no longer share the map
mutated by vendor probes. FE checks the isolation capability before requesting
vendor information. Four targeted Go race/isolation tests and
fresh/cached-source patch wiring passed on the rebased tree.
##########
fe/fe-connector/fe-connector-adbc/src/main/java/org/apache/doris/connector/adbc/AdbcDorisMetadata.java:
##########
@@ -0,0 +1,93 @@
+// 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.
+
+package org.apache.doris.connector.adbc;
+
+import org.apache.doris.connector.spi.DorisConnectorException;
+
+import org.apache.arrow.adbc.core.AdbcConnection;
+import org.apache.arrow.adbc.core.AdbcException;
+import org.apache.arrow.adbc.core.AdbcStatement;
+import org.apache.arrow.vector.VectorSchemaRoot;
+import org.apache.arrow.vector.ipc.ArrowReader;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.Consumer;
+
+/** Metadata confined to the remote catalog that the ADBC connection uses for
SQL execution. */
+final class AdbcDorisMetadata {
+ private static final DorisDialect DIALECT = new DorisDialect();
+
+ private AdbcDorisMetadata() {
+ }
+
+ static boolean isDorisSource(AdbcClient client) {
+ // sql_dialect changes SQL rendering, not the remote vendor's metadata
capabilities.
+ return
client.vendorName().map(String::trim).filter(DIALECT::matchesVendor).isPresent();
Review Comment:
Addressed by connection-scoped native information. The two-server test keeps
a Doris connection alive, probes another endpoint without SQL info, and
verifies that it receives the generic Flight SQL default instead of inheriting
DorisFE. That test passed with the race detector. Known non-Doris vendors still
use standard ADBC metadata even with sql_dialect=doris; the new compatibility
fallback only applies when vendor information is unavailable or generic.
##########
thirdparty/build-thirdparty.sh:
##########
@@ -1346,14 +1345,25 @@ build_arrow_adbc() {
-o "${TP_INSTALL_DIR}/lib64/libadbc_driver_jni.so" \
"${TP_INSTALL_DIR}/lib64/libadbc_driver_manager.a"
Review Comment:
Addressed in all three compilation Dockerfiles: each installs
checksum-pinned Go 1.26.5 before building third-party dependencies and retains
it on PATH. The Flight build runs go list -mod=readonly -m and go version
before compiling to validate/select the module toolchain. The fresh/cached ADBC
source and race tests passed; full Docker image builds were not run in this
update.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]