This is an automated email from the ASF dual-hosted git repository.
zhangstar333 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 92de16d4448 [fix](regression) Correct ADBC fixtures and expectations
(#68466)
92de16d4448 is described below
commit 92de16d4448cc5b8540345d10bd8a8d654aa7ed7
Author: Gabriel <[email protected]>
AuthorDate: Thu Sep 24 13:58:48 2026 +0800
[fix](regression) Correct ADBC fixtures and expectations (#68466)
### What problem does this PR solve?
Several ADBC regression suites fail when their drivers are available
because their fixtures and expectations no longer match the current type
semantics, or depend on the machine running the tests.
- Validate `SHOW CREATE CATALOG` against the configured driver and
fixture paths instead of a developer-specific golden DDL.
- Explicitly select the Doris dialect for Doris loopback catalogs so
failed vendor discovery cannot fall back to ANSI identifier quoting.
- Regenerate DATETIME and floating-point baselines, assert DATETIME
predicate pushdown, and compare timestamps directly with the source
without casts that hide type changes.
- Parse JSON explicitly when constructing VARIANT objects, retaining the
object baseline and adding a native serialization comparison.
The DOUBLE maximum, subnormal values, timestamp precision, NULLs,
export/reload checks, and source-table comparisons remain covered. No
product code is changed.
---
.../adbc/test_adbc_metadata_ops.out | 3 ---
.../external_table_p0/adbc/test_adbc_outfile.out | 6 +++---
.../adbc/test_adbc_predicate_pushdown.out | 6 +++---
.../adbc/test_adbc_type_mapping.out | 16 +++++++-------
.../adbc/test_adbc_catalog_scan.groovy | 4 ++++
.../adbc/test_adbc_column_pruning.groovy | 2 ++
.../adbc/test_adbc_cross_source.groovy | 2 ++
.../adbc/test_adbc_large_data.groovy | 11 +++++-----
.../adbc/test_adbc_metadata_ops.groovy | 11 +++++++++-
.../external_table_p0/adbc/test_adbc_mtmv.groovy | 2 ++
.../adbc/test_adbc_multi_backend.groovy | 4 ++++
.../adbc/test_adbc_nested_catalog.groovy | 2 ++
.../adbc/test_adbc_outfile.groovy | 3 +++
.../adbc/test_adbc_partitioned_read.groovy | 2 ++
.../adbc/test_adbc_predicate_pushdown.groovy | 13 ++++++-----
.../adbc/test_adbc_query_shapes.groovy | 2 ++
.../adbc/test_adbc_scan_edge.groovy | 4 ++++
.../adbc/test_adbc_source_table_models.groovy | 2 ++
.../adbc/test_adbc_type_binary_state.groovy | 2 ++
.../adbc/test_adbc_type_complex.groovy | 2 ++
.../adbc/test_adbc_type_mapping.groovy | 25 ++++++----------------
.../adbc/test_adbc_type_semantic.groovy | 8 +++++--
22 files changed, 81 insertions(+), 51 deletions(-)
diff --git
a/regression-test/data/external_table_p0/adbc/test_adbc_metadata_ops.out
b/regression-test/data/external_table_p0/adbc/test_adbc_metadata_ops.out
index 0851962d8d8..4d1b5fb9f82 100644
--- a/regression-test/data/external_table_p0/adbc/test_adbc_metadata_ops.out
+++ b/regression-test/data/external_table_p0/adbc/test_adbc_metadata_ops.out
@@ -1,7 +1,4 @@
-- This file is automatically generated. You should know what you did if you
want to edit this
--- !show_create_catalog --
-test_adbc_metadata_ops_catalog \nCREATE CATALOG
`test_adbc_metadata_ops_catalog` PROPERTIES (\n"uri" =
"file:/tmp/doris_adbc_regression/test_adbc_metadata_ops.db",\n"type" =
"adbc",\n"driver_url" =
"/mnt/disk1/yy/git/wt-adbc-catalog/thirdparty/installed/lib64/libadbc_driver_sqlite.so"\n);
-
-- !show_databases --
information_schema
main
diff --git a/regression-test/data/external_table_p0/adbc/test_adbc_outfile.out
b/regression-test/data/external_table_p0/adbc/test_adbc_outfile.out
index e9258729175..2e528f72b8c 100644
--- a/regression-test/data/external_table_p0/adbc/test_adbc_outfile.out
+++ b/regression-test/data/external_table_p0/adbc/test_adbc_outfile.out
@@ -6,8 +6,8 @@
4 dave \N \N \N
-- !source_for_export --
-1 alice 10.25 2024-01-01 2024-01-01 10:00:00.000+08:00
-2 bob 20.50 2024-02-01 2024-02-01 11:00:00.500+08:00
-3 \N 30.75 2024-03-01 2024-03-01 12:00:00.250+08:00
+1 alice 10.25 2024-01-01 2024-01-01T10:00
+2 bob 20.50 2024-02-01 2024-02-01T11:00:00.500
+3 \N 30.75 2024-03-01 2024-03-01T12:00:00.250
4 dave \N \N \N
diff --git
a/regression-test/data/external_table_p0/adbc/test_adbc_predicate_pushdown.out
b/regression-test/data/external_table_p0/adbc/test_adbc_predicate_pushdown.out
index 4ade37bc98e..ef97869e2fa 100644
---
a/regression-test/data/external_table_p0/adbc/test_adbc_predicate_pushdown.out
+++
b/regression-test/data/external_table_p0/adbc/test_adbc_predicate_pushdown.out
@@ -44,9 +44,9 @@
6 2024-06-01
-- !pred_ts --
-3 2024-03-01 23:59:59.999999+08:00
-5 2024-05-01 06:00:00.000001+08:00
-6 2024-06-01 06:00:00.000000+08:00
+3 2024-03-01T23:59:59.999999
+5 2024-05-01T06:00:00.000001
+6 2024-06-01T06:00
-- !pred_or --
1
diff --git
a/regression-test/data/external_table_p0/adbc/test_adbc_type_mapping.out
b/regression-test/data/external_table_p0/adbc/test_adbc_type_mapping.out
index 86ada2a7e43..13f9d0caabd 100644
--- a/regression-test/data/external_table_p0/adbc/test_adbc_type_mapping.out
+++ b/regression-test/data/external_table_p0/adbc/test_adbc_type_mapping.out
@@ -23,9 +23,9 @@ c_double double Yes true \N
-- !select_float --
1 -1.5 -2.25
-2 3.402823E38 1.797693134862316e+308
+2 3.4028235e+38 1.7976931348623157e+308
3 0.0 0
-4 1.4E-45 4.940656458412465e-324
+4 1.4E-45 5e-324
5 \N \N
-- !desc_decimal --
@@ -69,14 +69,14 @@ c_string text Yes true \N
-- !desc_datetime --
id int No true \N
c_date date Yes true \N
-c_dt0 timestamptz Yes true \N
-c_dt3 timestamptz(3) Yes true \N
-c_dt6 timestamptz(6) Yes true \N
+c_dt0 datetime Yes true \N
+c_dt3 datetime(3) Yes true \N
+c_dt6 datetime(6) Yes true \N
-- !select_datetime --
-1 1900-01-01 1900-01-01 00:00:00+08:05 1900-01-01
00:00:00.001+08:05 1900-01-01 00:00:00.000001+08:05
-2 2024-02-29 2024-02-29 23:59:59+08:00 2024-02-29
23:59:59.999+08:00 2024-02-29 23:59:59.999999+08:00
-3 9999-12-31 9999-12-31 23:59:59+08:00 9999-12-31
23:59:59.123+08:00 9999-12-31 23:59:59.123456+08:00
+1 1900-01-01 1900-01-01T00:00 1900-01-01T00:00:00.001
1900-01-01T00:00:00.000001
+2 2024-02-29 2024-02-29T23:59:59 2024-02-29T23:59:59.999
2024-02-29T23:59:59.999999
+3 9999-12-31 9999-12-31T23:59:59 9999-12-31T23:59:59.123
9999-12-31T23:59:59.123456
4 \N \N \N \N
-- !select_datetime_micros --
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_catalog_scan.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_catalog_scan.groovy
index 1a859e6defa..8b70e9b0629 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_catalog_scan.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_catalog_scan.groovy
@@ -104,6 +104,8 @@ suite("test_adbc_catalog_scan", "p0,external") {
CREATE CATALOG ${catalogName} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
@@ -182,6 +184,8 @@ suite("test_adbc_catalog_scan", "p0,external") {
CREATE CATALOG ${singleRangeCatalog} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_column_pruning.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_column_pruning.groovy
index 8f8999797ec..535552b5344 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_column_pruning.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_column_pruning.groovy
@@ -99,6 +99,8 @@ suite("test_adbc_column_pruning", "p0,external") {
CREATE CATALOG ${catalogName} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_cross_source.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_cross_source.groovy
index d8d5297fe28..e8239217607 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_cross_source.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_cross_source.groovy
@@ -180,6 +180,8 @@ suite("test_adbc_cross_source", "p0,external") {
CREATE CATALOG ${flightCatalog} PROPERTIES (
"type" = "adbc",
"driver_url" = "${flightDriverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_large_data.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_large_data.groovy
index 4fef89588e1..7aaff4d83a3 100644
--- a/regression-test/suites/external_table_p0/adbc/test_adbc_large_data.groovy
+++ b/regression-test/suites/external_table_p0/adbc/test_adbc_large_data.groovy
@@ -132,6 +132,8 @@ suite("test_adbc_large_data", "p0,external") {
CREATE CATALOG ${flightCatalog} PROPERTIES (
"type" = "adbc",
"driver_url" = "${flightDriverPath}",
+ -- The loopback source is Doris even when vendor detection
is unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
@@ -181,11 +183,8 @@ suite("test_adbc_large_data", "p0,external") {
conserved("count(DISTINCT flag), sum(CASE WHEN flag THEN 1 ELSE 0
END)", "")
conserved("sum(big_id), min(big_id), max(big_id)", "")
conserved("min(d), max(d), count(DISTINCT d)", "")
- // ts is cast back to the source's type first: a Doris source
stamps the session zone onto
- // every DATETIMEV2 it writes to Arrow, so the column arrives as
TIMESTAMPTZ and prints an
- // offset the native read does not. The cast is a no-op on the
source side, leaving the
- // instants -- and the DISTINCT count, which is what a batch lost
mid-stream would move.
- conserved("min(CAST(ts AS DATETIME(3))), max(CAST(ts AS
DATETIME(3))), count(DISTINCT ts)", "")
+ // Compare the original DATETIME values so a timezone/type change
cannot be hidden by a cast.
+ conserved("min(ts), max(ts), count(DISTINCT ts)", "")
// Grouped, so a lost or repeated batch lands in a few groups
rather than in one total -- a
// difference the aggregate totals above could in principle cancel
out.
@@ -220,6 +219,8 @@ suite("test_adbc_large_data", "p0,external") {
CREATE CATALOG ${flightSingleRange} PROPERTIES (
"type" = "adbc",
"driver_url" = "${flightDriverPath}",
+ -- The loopback source is Doris even when vendor detection
is unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_metadata_ops.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_metadata_ops.groovy
index 67603321ca1..0d374b9d0df 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_metadata_ops.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_metadata_ops.groovy
@@ -124,7 +124,14 @@ suite("test_adbc_metadata_ops", "p0,external") {
assertTrue(catalogNames.contains(catalogName),
"the catalog is missing from SHOW CATALOGS: ${catalogNames}")
- qt_show_create_catalog """SHOW CREATE CATALOG ${catalogName}"""
+ // Driver and fixture paths belong to this run, so a machine-specific
golden DDL is invalid.
+ def createCatalog = sql("SHOW CREATE CATALOG ${catalogName}")
+ assertEquals(1, createCatalog.size())
+ assertEquals(catalogName, createCatalog[0][0].toString())
+ String catalogDdl = createCatalog[0][1].toString()
+ assertTrue(catalogDdl.contains('"type" = "adbc"'), catalogDdl)
+ assertTrue(catalogDdl.contains('"driver_url" = "' + sqliteDriverPath +
'"'), catalogDdl)
+ assertTrue(catalogDdl.contains('"uri" = "file:' + dbFile.absolutePath
+ '"'), catalogDdl)
qt_show_databases """SHOW DATABASES FROM ${catalogName}"""
qt_show_tables """SHOW TABLES FROM ${catalogName}.${sqliteDb}"""
@@ -286,6 +293,8 @@ suite("test_adbc_metadata_ops", "p0,external") {
CREATE CATALOG ${flightCatalog} PROPERTIES (
"type" = "adbc",
"driver_url" = "${flightDriverPath}",
+ -- The loopback source is Doris even when vendor detection
is unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_mtmv.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_mtmv.groovy
index d7424e73377..44272128b54 100644
--- a/regression-test/suites/external_table_p0/adbc/test_adbc_mtmv.groovy
+++ b/regression-test/suites/external_table_p0/adbc/test_adbc_mtmv.groovy
@@ -116,6 +116,8 @@ suite("test_adbc_mtmv", "p0,external") {
CREATE CATALOG ${catalogName} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_multi_backend.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_multi_backend.groovy
index c79feeca263..d0d8e5e8be0 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_multi_backend.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_multi_backend.groovy
@@ -119,6 +119,8 @@ suite("test_adbc_multi_backend", "p0,external") {
CREATE CATALOG ${name} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
@@ -226,6 +228,8 @@ suite("test_adbc_multi_backend", "p0,external") {
CREATE CATALOG ${singleRangeCatalog} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_nested_catalog.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_nested_catalog.groovy
index f263de33cd3..f027e3cf321 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_nested_catalog.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_nested_catalog.groovy
@@ -161,6 +161,8 @@ suite("test_adbc_nested_catalog", "p0,external") {
CREATE CATALOG ${outerCatalog} PROPERTIES (
"type" = "adbc",
"driver_url" = "${flightDriverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_outfile.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_outfile.groovy
index c8c642a3f24..4ecc616c2c1 100644
--- a/regression-test/suites/external_table_p0/adbc/test_adbc_outfile.groovy
+++ b/regression-test/suites/external_table_p0/adbc/test_adbc_outfile.groovy
@@ -159,6 +159,8 @@ suite("test_adbc_outfile", "p0,external") {
CREATE CATALOG ${catalogName} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
@@ -344,6 +346,7 @@ suite("test_adbc_outfile", "p0,external") {
"the data exported from the ADBC catalog and loaded back
does not match the source")
}
+ // The source DATETIME is timezone-free, just like the reloaded column
checked above.
qt_source_for_export """
SELECT id, name, amount, d, ts FROM ${adbcTable} ORDER BY id
"""
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_partitioned_read.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_partitioned_read.groovy
index fc4aa1adea9..0dfe6df03a4 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_partitioned_read.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_partitioned_read.groovy
@@ -96,6 +96,8 @@ suite("test_adbc_partitioned_read", "p0,external") {
CREATE CATALOG ${name} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_predicate_pushdown.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_predicate_pushdown.groovy
index 38cb794bdb5..f78e872128f 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_predicate_pushdown.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_predicate_pushdown.groovy
@@ -110,6 +110,8 @@ suite("test_adbc_predicate_pushdown", "p0,external") {
CREATE CATALOG ${catalogName} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
@@ -208,13 +210,8 @@ suite("test_adbc_predicate_pushdown", "p0,external") {
pushes("amount > 20.50", "`amount` >")
pushes("big = 9223372036854775807", "9223372036854775807")
pushes("d = '2024-01-01'", "DATE '2024-01-01'")
- // The one comparison family this connector will not push, and the
reason is that this source's
- // datetime column arrives as TIMESTAMPTZ: an instant. By the time the
literal reaches the
- // dialect it has been converted to UTC, and standard SQL's TIMESTAMP
'...' spelling carries no
- // zone, so the source would read that UTC wall clock as its own local
time. East of UTC that
- // merely widens the match; west of UTC it drops rows the query
wanted, and a scan cannot get
- // back rows the source never sent. sameAsSource below is what says
the ANSWER is still right.
- pushesNothing("ts > '2024-01-01 00:00:00'")
+ // DATETIME stays timezone-free through Flight SQL, so a TIMESTAMP
literal preserves its value.
+ pushes("ts > '2024-01-01 00:00:00'", "`ts` > TIMESTAMP '2024-01-01
00:00:00'")
["name = 'alice'", "name = 'O''Brien'", "score > 2.5", "amount >
20.50",
"big = 9223372036854775807", "d = '2024-01-01'",
"ts > '2024-01-01 00:00:00'"].each { sameAsSource(it) }
@@ -396,6 +393,8 @@ suite("test_adbc_predicate_pushdown", "p0,external") {
CREATE CATALOG ${singleRangeCatalog} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_query_shapes.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_query_shapes.groovy
index 3d5c1d1c610..b4c3e25eca0 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_query_shapes.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_query_shapes.groovy
@@ -121,6 +121,8 @@ suite("test_adbc_query_shapes", "p0,external") {
CREATE CATALOG ${catalogName} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_scan_edge.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_scan_edge.groovy
index df8e2a1921e..d6502aee217 100644
--- a/regression-test/suites/external_table_p0/adbc/test_adbc_scan_edge.groovy
+++ b/regression-test/suites/external_table_p0/adbc/test_adbc_scan_edge.groovy
@@ -124,6 +124,8 @@ suite("test_adbc_scan_edge", "p0,external") {
CREATE CATALOG ${catalogName} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
@@ -134,6 +136,8 @@ suite("test_adbc_scan_edge", "p0,external") {
CREATE CATALOG ${singleRangeCatalog} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_source_table_models.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_source_table_models.groovy
index a6254a26046..f11fab0d534 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_source_table_models.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_source_table_models.groovy
@@ -184,6 +184,8 @@ suite("test_adbc_source_table_models", "p0,external") {
CREATE CATALOG ${catalogName} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_type_binary_state.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_type_binary_state.groovy
index fb598874510..4f077cb81be 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_type_binary_state.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_type_binary_state.groovy
@@ -120,6 +120,8 @@ suite("test_adbc_type_binary_state", "p0,external") {
CREATE CATALOG ${catalogName} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_type_complex.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_type_complex.groovy
index db5b4bd83e9..b3caa321884 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_type_complex.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_type_complex.groovy
@@ -159,6 +159,8 @@ suite("test_adbc_type_complex", "p0,external") {
CREATE CATALOG ${catalogName} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_type_mapping.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_type_mapping.groovy
index 9d27447cb70..409eaace911 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_type_mapping.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_type_mapping.groovy
@@ -188,6 +188,8 @@ suite("test_adbc_type_mapping", "p0,external") {
CREATE CATALOG ${catalogName} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
@@ -229,16 +231,8 @@ suite("test_adbc_type_mapping", "p0,external") {
qt_desc_float """DESC ${catalogName}.${dbName}.t_float"""
qt_select_float """SELECT id, c_float, c_double FROM
${catalogName}.${dbName}.t_float ORDER BY id"""
- // Compared INSIDE Doris rather than through sameAsSource, and not
because ADBC needs the
- // help: the fixture's DBL_MAX cannot make the trip to the test client
at all. Doris renders a
- // double with 16 significant digits, so 1.7976931348623157E308 comes
back as the text
- // 1.797693134862316e+308 -- a value ABOVE DBL_MAX, which parses to
infinity and makes the
- // JDBC driver throw "Value '∞' is outside of valid range" before any
comparison happens. The
- // native read of the source table prints exactly the same text, so
this is Doris's own
- // double-to-text rounding, not an ADBC fault, and swapping the
fixture for a rounder number
- // would drop the one row that proves a double is not narrowed to a
float somewhere in the
- // Arrow round trip. <=> is null-safe, so row 5's nulls have to match
as nulls, and the join
- // makes every value a bit-for-bit comparison the client never sees.
+ // Compare boundary values inside Doris as well: the golden output
must not round DBL_MAX
+ // above the finite range, and the null-safe join checks exact values
independently of formatting.
def floatRowsMatched = sql("""
SELECT count(*) FROM ${catalogName}.${dbName}.t_float a
JOIN internal.${dbName}.t_float s ON a.id = s.id
@@ -285,15 +279,8 @@ suite("test_adbc_type_mapping", "p0,external") {
SELECT id, c_date, c_dt0, c_dt3, c_dt6
FROM ${catalogName}.${dbName}.t_datetime ORDER BY id
"""
- // Cast back to the source's own type before comparing, and only for
the datetime columns: a
- // Doris source stamps the session's zone onto every DATETIMEV2 it
writes to Arrow (the Arrow
- // timestamp type carries a zone), so this connector maps them to
TIMESTAMPTZ and the values
- // come back rendered with a +hh:mm offset that the native read does
not print. The cast is a
- // no-op on the source side, so what remains under comparison is the
instant -- which is the
- // thing that must survive. The rendered form is pinned by
qt_select_datetime above. c_date is
- // left alone: DATEV2 has no zone to stamp and comes back a plain date.
- sameAsSource("t_datetime", "id, c_date, CAST(c_dt0 AS DATETIME(0)), "
- + "CAST(c_dt3 AS DATETIME(3)), CAST(c_dt6 AS DATETIME(6))")
+ // DATETIME must keep its precision and timezone-free type through the
Arrow round trip.
+ sameAsSource("t_datetime", "id, c_date, c_dt0, c_dt3, c_dt6")
// The sub-second digits on their own. A scale collapsed to seconds
still prints a plausible
// timestamp, and the microsecond column is where a nanosecond source
would be truncated.
diff --git
a/regression-test/suites/external_table_p0/adbc/test_adbc_type_semantic.groovy
b/regression-test/suites/external_table_p0/adbc/test_adbc_type_semantic.groovy
index 7222c686323..9fdb611bbbc 100644
---
a/regression-test/suites/external_table_p0/adbc/test_adbc_type_semantic.groovy
+++
b/regression-test/suites/external_table_p0/adbc/test_adbc_type_semantic.groovy
@@ -145,6 +145,8 @@ suite("test_adbc_type_semantic", "p0,external") {
CREATE CATALOG ${catalogName} PROPERTIES (
"type" = "adbc",
"driver_url" = "${driverPath}",
+ -- The loopback source is Doris even when vendor detection is
unavailable.
+ "sql_dialect" = "doris",
"uri" = "grpc://127.0.0.1:${arrowPort}",
"user" = "root",
"password" = "",
@@ -251,15 +253,17 @@ suite("test_adbc_type_semantic", "p0,external") {
) DUPLICATE KEY(`id`) DISTRIBUTED BY HASH(`id`) BUCKETS 1
PROPERTIES ("replication_num" = "1")
"""
+ // Casting a string to VARIANT preserves a scalar; parse JSON to
exercise object serialization.
sql """
INSERT INTO internal.${dbName}.t_variant VALUES
- (1, '{"a": 1, "b": "two"}'),
- (2, '{"nested": {"deep": 3}}'),
+ (1, parse_to_variant('{"a": 1, "b": "two"}')),
+ (2, parse_to_variant('{"nested": {"deep": 3}}')),
(3, NULL)
"""
qt_desc_variant """DESC ${catalogName}.${dbName}.t_variant"""
qt_select_variant """SELECT id, c_var FROM
${catalogName}.${dbName}.t_variant ORDER BY id"""
+ sameAsSourceText("t_variant", "c_var")
assertEquals("text", externalTypeOf("t_variant", "c_var"),
"VARIANT is serialised as Arrow utf8, so the external column
is a string and its "
+ "sub-columns are no longer addressable through the
catalog")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]