This is an automated email from the ASF dual-hosted git repository. HappenLee pushed a commit to branch paimon-blob-4.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit af5f4959d036e261f085626854dd4e583cfb7c7a Author: linzhenqi <[email protected]> AuthorDate: Fri Oct 23 09:52:30 2026 +0800 [fix](regression) Update FILE tests for provider addressing and cast restrictions ### What problem does this PR solve? Problem Summary: Select the LIST_FILES fixture client's addressing mode from s3Provider and pass the same setting to the Doris S3 resource, allowing OSS to use virtual-hosted addressing. Construct nested FILE values directly in the spill and SQL result cache suites with ARRAY, NAMED_STRUCT and MAP. ### Release note None ### Check List (For Author) - Test: Full ASAN BE/FE build; test_list_files, test_file_type_spill and test_file_type_sql_cache passed with unchanged expected output. LIST_FILES used local MinIO; OSS was not available for execution. - Behavior changed: No - Does this need documentation: No (cherry picked from commit 172372c464bf274853ec962f6f0df65c955a149e) --- .../suites/datatype_p0/complex_types/test_list_files.groovy | 5 +++-- .../suites/query_p0/cache/test_file_type_sql_cache.groovy | 8 +++----- regression-test/suites/spill_p0/test_file_type_spill.groovy | 4 +--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/regression-test/suites/datatype_p0/complex_types/test_list_files.groovy b/regression-test/suites/datatype_p0/complex_types/test_list_files.groovy index fc963c96f6a..cc1dea3ac98 100644 --- a/regression-test/suites/datatype_p0/complex_types/test_list_files.groovy +++ b/regression-test/suites/datatype_p0/complex_types/test_list_files.groovy @@ -22,10 +22,11 @@ import com.amazonaws.services.s3.AmazonS3ClientBuilder import com.amazonaws.services.s3.model.ObjectMetadata suite("test_list_files", "p0,external") { + boolean usePathStyle = getS3Provider().equalsIgnoreCase("S3") def client = AmazonS3ClientBuilder.standard() .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(getS3Endpoint(), getS3Region())) .withCredentials(new AWSStaticCredentialsProvider(new BasicAWSCredentials(getS3AK(), getS3SK()))) - .withPathStyleAccessEnabled(true).build() + .withPathStyleAccessEnabled(usePathStyle).build() String bucket = getS3BucketName() String prefix = "list-files/${UUID.randomUUID()}/" String root = "s3://${bucket}/${prefix}" @@ -45,7 +46,7 @@ suite("test_list_files", "p0,external") { sql """CREATE RESOURCE list_files_s3 PROPERTIES( "type"="s3", "s3.endpoint"="${getS3Endpoint()}", "s3.region"="${getS3Region()}", "s3.access_key"="${getS3AK()}", "s3.secret_key"="${getS3SK()}", - "s3.bucket"="${bucket}", "s3.root.path"="unused", "use_path_style"="true")""" + "s3.bucket"="${bucket}", "s3.root.path"="unused", "use_path_style"="${usePathStyle}")""" def listing = { String path, String recursive -> """list_files("resource"="list_files_s3", "uri"="${path}"${recursive})""" } diff --git a/regression-test/suites/query_p0/cache/test_file_type_sql_cache.groovy b/regression-test/suites/query_p0/cache/test_file_type_sql_cache.groovy index e29bd4cecba..5eeee492945 100644 --- a/regression-test/suites/query_p0/cache/test_file_type_sql_cache.groovy +++ b/regression-test/suites/query_p0/cache/test_file_type_sql_cache.groovy @@ -18,8 +18,6 @@ // Exercise the real FE/BE SQL result cache, including a verified cache plan. // Internal six-child payload retention is covered separately by QueryCache BE tests. suite("test_file_type_sql_cache") { - def publicStruct = "STRUCT<uri:VARCHAR(65533),offset:BIGINT,size:BIGINT," + - "content_type:VARCHAR(1024),checksum:VARCHAR(1024),inline:VARBINARY>" def hasSqlCache = { String statement -> sql("EXPLAIN PHYSICAL PLAN " + statement).collect { it[0].toString() } .join("\n").contains("PhysicalSqlCache") @@ -55,9 +53,9 @@ suite("test_file_type_sql_cache") { """ def statement = """ SELECT id, f, - CAST(ARRAY(CAST(f AS ${publicStruct}), NULL) AS ARRAY<FILE>) AS files, - CAST(NAMED_STRUCT('f', CAST(f AS ${publicStruct})) AS STRUCT<f:FILE>) AS holder, - CAST(MAP('source', CAST(f AS ${publicStruct})) AS MAP<STRING,FILE>) AS lookup + ARRAY(f, NULL) AS files, + NAMED_STRUCT('f', f) AS holder, + MAP('source', f) AS lookup FROM (SELECT id, CAST(IF(uri IS NULL, NULL, NAMED_STRUCT('uri', uri, 'offset', file_offset, 'size', file_size, 'content_type', content_type, 'checksum', checksum, 'inline', NULL)) AS FILE) AS f diff --git a/regression-test/suites/spill_p0/test_file_type_spill.groovy b/regression-test/suites/spill_p0/test_file_type_spill.groovy index be0fad362ba..8ab7116f1aa 100644 --- a/regression-test/suites/spill_p0/test_file_type_spill.groovy +++ b/regression-test/suites/spill_p0/test_file_type_spill.groovy @@ -16,8 +16,6 @@ // under the License. suite("test_file_type_spill") { - def publicStruct = "STRUCT<uri:VARCHAR(65533),offset:BIGINT,size:BIGINT," + - "content_type:VARCHAR(1024),checksum:VARCHAR(1024),inline:VARBINARY>" sql "DROP TABLE IF EXISTS test_file_type_spill_source" sql """ CREATE TABLE test_file_type_spill_source (id INT NOT NULL) @@ -34,7 +32,7 @@ suite("test_file_type_spill") { FROM test_file_type_spill_source ), test_file_type_spill_values AS ( SELECT id, category, f, - CAST(ARRAY(CAST(f AS ${publicStruct}), NULL) AS ARRAY<FILE>) AS files + ARRAY(f, NULL) AS files FROM file_values ) """ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
