Skip to content

Commit a7df11f

Browse files
committed
[test](regression) Adapt remaining cases to disabled LOCAL TVF
### What problem does this PR solve? Issue Number: N/A Related PR: #69592 Problem Summary: The optional UUID local-export mode still reloaded through LOCAL after LOCAL TVF was disabled. Use the disabled error expectation where applicable and retain the existing S3 UUID export/reload path, fixtures, export completion checks and golden assertions. ### Release note None ### Check List (For Author) - Test: Groovy 4.0.19 syntax parsing and git diff --check passed; runtime regression not executed locally. - Behavior changed: No (test adaptation only) - Does this need documentation: No
1 parent 0bb02dc commit a7df11f

1 file changed

Lines changed: 5 additions & 26 deletions

File tree

‎regression-test/suites/datatype_p0/uuid/test_uuid_export.groovy‎

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,12 @@
1919
// UUID annotations must survive export and nested-column reload without binary reinterpretation.
2020
suite("test_uuid_export", "p0,external") {
2121

22-
String localPath = context.config.otherConfigs.get("uuidLocalExportPath")
23-
boolean localMode = localPath != null
2422
String token = UUID.randomUUID().toString()
25-
String outputPath
26-
String sinkProperties
27-
String sourceProperties
28-
if (localMode) {
29-
outputPath = "file://${localPath}_${token}_"
30-
sinkProperties = ""
31-
def backends = sql "SHOW BACKENDS"
32-
sourceProperties = "\"backend_id\"=\"${backends[0][0]}\""
33-
} else {
34-
outputPath = "s3://${context.config.otherConfigs.get('s3BucketName')}/uuid_file_export/${token}_"
35-
sinkProperties = """
23+
String outputPath = "s3://${context.config.otherConfigs.get('s3BucketName')}/uuid_file_export/${token}_"
24+
String sinkProperties = """
3625
"s3.endpoint"="${getS3Endpoint()}", "s3.region"="${getS3Region()}",
3726
"s3.access_key"="${getS3AK()}", "s3.secret_key"="${getS3SK()}"
3827
"""
39-
sourceProperties = sinkProperties
40-
}
4128
sql "DROP TABLE IF EXISTS uuid_file_export"
4229
sql """CREATE TABLE uuid_file_export (id INT, u UUID, a ARRAY<UUID>, s STRUCT<k:UUID>)
4330
DUPLICATE KEY(id) DISTRIBUTED BY HASH(id) BUCKETS 1
@@ -49,14 +36,10 @@ suite("test_uuid_export", "p0,external") {
4936
(3, NULL, NULL, NULL)"""
5037
qt_source "SELECT * FROM uuid_file_export ORDER BY id"
5138
String exportPath = "${outputPath}export/"
52-
if (localMode) {
53-
new File("${localPath}_${token}_export").mkdirs()
54-
}
5539
String label = "uuid_export_${token.replace('-', '_')}"
56-
String storageClause = localMode ? "" : "WITH S3 (${sinkProperties})"
5740
sql """EXPORT TABLE uuid_file_export TO "${exportPath}"
5841
PROPERTIES("label"="${label}", "format"="parquet")
59-
${storageClause}"""
42+
WITH S3 (${sinkProperties})"""
6043
String state = ""
6144
for (int attempt = 0; attempt < 60; ++attempt) {
6245
def jobs = sql "SHOW EXPORT WHERE LABEL='${label}'"
@@ -70,14 +53,10 @@ suite("test_uuid_export", "p0,external") {
7053
sleep(2000)
7154
}
7255
assertEquals("FINISHED", state)
73-
String exportInput = localMode
74-
? "${context.config.otherConfigs.get('uuidLocalTvfPath')}_${token}_export/*"
75-
: "${exportPath}*"
76-
String exportTvf = localMode ? "local" : "s3"
77-
String exportKey = localMode ? "file_path" : "uri"
56+
String exportInput = "${exportPath}*"
7857
sql "DROP TABLE IF EXISTS uuid_file_export_reload"
7958
sql "CREATE TABLE uuid_file_export_reload LIKE uuid_file_export"
8059
sql """INSERT INTO uuid_file_export_reload
81-
SELECT * FROM ${exportTvf}("${exportKey}"="${exportInput}", "format"="parquet", ${sourceProperties})"""
60+
SELECT * FROM s3("uri"="${exportInput}", "format"="parquet", ${sinkProperties})"""
8261
qt_export "SELECT * FROM uuid_file_export_reload ORDER BY id"
8362
}

0 commit comments

Comments
 (0)