Skip to content

Commit 86cd873

Browse files
committed
[fix](regression) Expect SQL NULL for invalid Paimon Variant JSON
Problem Summary: The Paimon writer error suite expected try_parse_to_variant on invalid JSON to preserve a string, but the function returns SQL NULL. Regenerate the expected result and correct the adjacent explanation while retaining the original input and round-trip checks. None - Test: Reproduced the original full suite failure with the CI binary; regenerated output with the regression runner, then reran the full suite successfully (zero failures or skips). - Behavior changed: No product behavior changes. - Does this need documentation: No.
1 parent 0b09ced commit 86cd873

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎regression-test/data/external_table_p0/paimon/write/test_paimon_write_variant_errors.out‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- This file is automatically generated. You should know what you did if you want to edit this
22
-- !variant_after_errors --
33
20 false true {"recovered":true}
4-
21 false \N not-json
4+
21 true \N \N
55
22 false \N {"typed":"string"}
66
23 false \N 7
77
24 false \N values-string

‎regression-test/suites/external_table_p0/paimon/write/test_paimon_write_variant_errors.groovy‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ suite("test_paimon_write_variant_errors", "p0,external,paimon,nonConcurrent") {
202202
row.collect { value -> value == null ? null : value.toString() }
203203
})
204204

205-
// Invalid JSON is preserved as a Variant string unless the global
206-
// throw-on-invalid-JSON option is enabled.
205+
// TRY parsing invalid JSON produces SQL NULL before the Paimon sink;
206+
// the round trip must preserve that NULL rather than a Variant string.
207207
order_qt_variant_after_errors """
208208
SELECT id, payload IS NULL,
209209
CAST(payload['recovered'] AS BOOLEAN),

0 commit comments

Comments
 (0)