Skip to content

Commit 7e29433

Browse files
committed
[test](load) Match V2 diagnostics in stream load regressions
Update CSV encoding, CSV field-count, and JSON no-match error assertions for the reader selected by this PR. Preserve load status, rejected-row counts and the exact JSON source record checks. Cover the following JSON alias check that was hidden by the earlier assertion failure as well. Validation: four Groovy assertion replays fail before the change and pass afterward, using recorded CI responses for the three reported failures and the reader-defined diagnostic for the subsequent alias check. Groovy syntax checks, clang-format 16 for the PR's 17 C++ files, and diff checks pass. Full cluster regression execution remains for CI.
1 parent a73b750 commit 7e29433

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎regression-test/suites/load_p0/stream_load/test_csv_with_none_utf8_data.groovy‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ suite("test_csv_with_none_utf8_data", "p0") {
5555
def json = parseJson(result)
5656
def (code, out, err) = curl("GET", json.ErrorURL)
5757
log.info("error result: " + out)
58-
def checkError = out.contains("Invalid file encoding: all CSV files must be UTF-8 encoded")
58+
// Supported loads use V2 diagnostics; keep the rejection-count checks below.
59+
def checkError = out.contains("[DATA_QUALITY_ERROR]Only support csv data in utf8 codec")
5960
assertTrue(checkError)
6061
assertEquals("fail", json.Status.toLowerCase())
6162
assertTrue(json.Message.contains("too many filtered rows"))

‎regression-test/suites/load_p0/stream_load/test_json_load.groovy‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,8 @@ suite("test_json_load", "p0,nonConcurrent") {
766766
def code = process.waitFor()
767767
def out = process.text
768768
log.info("result: ${out}".toString())
769-
def reason = "Reason: There is no column matching jsonpaths in the json file, columns:[name, age, agent_id, ], please check columns and jsonpaths:[\"\$.Name\", \"\$.Age\", \"\$.Agent_id\"]. src line [{\"name\":\"Name1\",\"age\":21,\"agent_id\":\"1\"}]; \n"
769+
// V2 distinguishes unmatched JSON paths from unmatched object fields.
770+
def reason = "Reason: [DATA_QUALITY_ERROR]No source column matches the JSON paths. src line [{\"name\":\"Name1\",\"age\":21,\"agent_id\":\"1\"}]; \n"
770771
assertEquals("${reason}", "${out}")
771772
}
772773
}
@@ -802,7 +803,8 @@ suite("test_json_load", "p0,nonConcurrent") {
802803
def code = process.waitFor()
803804
def out = process.text
804805
log.info("result: ${out}".toString())
805-
def reason = "Reason: There is no column matching jsonpaths in the json file, columns:[Name, Age, Agent_id, ], please check columns and jsonpaths:. src line [{\"name\":\"Name1\",\"age\":21,\"agent_id\":\"1\"}]; \n"
806+
// Case-sensitive source aliases take V2's unmatched-object path.
807+
def reason = "Reason: [DATA_QUALITY_ERROR]No source column matches this JSON object. src line [{\"name\":\"Name1\",\"age\":21,\"agent_id\":\"1\"}]; \n"
806808
assertEquals("${reason}", "${out}")
807809
}
808810
}

‎regression-test/suites/load_p0/stream_load/test_stream_load_error_url.groovy‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ suite("test_stream_load_error_url", "p0") {
6666
assertTrue(json.Message.contains("[DATA_QUALITY_ERROR]too many filtered rows"))
6767
def (code, out, err) = curl("GET", json.ErrorURL)
6868
log.info("error result: " + out)
69-
assertTrue(out.contains("Column count mismatch: expected"))
69+
// V2 reports physical field counts before destination conversion.
70+
assertTrue(out.contains("[DATA_QUALITY_ERROR]Expected 3 fields, found 9"))
7071
log.info("url: " + json.ErrorURL)
7172
if (isCloudMode()) {
7273
assertTrue(json.ErrorURL.contains("X-Amz-Signature=") || json.ErrorURL.contains("error_log"))

0 commit comments

Comments
 (0)