Repository navigation
Commit 41a58af
authored
Issue Number: DORIS-29778
Problem Summary:
Test fixtures still assume the behavior that #68447 removed.
1.
`regression-test/suites/variant_p0/test_variant_json_functions.groovy`
builds its
Variant string row with `parse_to_variant('abc')`, which relied on the
old permissive
fallback that stored text that is not a JSON document as a Variant
string. Since
#68447, `parse_to_variant` rejects such input, so the INSERT fails and
the suite
stops before any assertion runs:
```
errCode = 2, detailMessage = [INVALID_ARGUMENT]Parse json document failed at row 0,
error: [INVALID_ARGUMENT]Failed to parse JSON as Variant
```
Parse the equivalent JSON string document `"abc"` instead: it produces
the same
Variant string value, so the remaining assertions still pass and the
expected
result file is unchanged.
2. BE unit tests still pass the removed
`JsonToVariantOptions::check_duplicate_json_path`
field, so the BE UT build fails to compile:
```
core/data_type_serde/data_type_variant_v2_serde_jsonb_test.cpp:115:32: error:
no matching constructor for initialization of 'JsonStringToVariantEncoder'
format/transformer/vparquet_writer_test.cpp:198:32: error:
no matching constructor for initialization of 'JsonStringToVariantEncoder'
```
Remove the field from the six affected initializers in
`data_type_serde_arrow_test.cpp`,
`data_type_variant_v2_serde_jsonb_test.cpp`,
`variant_v2_execution_test.cpp` and
`format/transformer/vparquet_writer_test.cpp`
(the last two were added by #69194) (DORIS-29778).
3. `external_table_p0/paimon/write/test_paimon_write_variant_errors`
expects
`try_parse_to_variant('not-json')` to be stored as the Variant string
`not-json`,
while it now returns NULL, so the row 21 check fails:
```
ExpectRow: [21, false, null, not-json]
RealRow : [21, true, null, null]
```
1 parent 61179b6 commit 41a58af
7 files changed
Lines changed: 16 additions & 22 deletions
File tree
- be/test
- core/data_type_serde
- exprs
- format/transformer
- regression-test
- data/external_table_p0/paimon/write
- suites
- external_table_p0/paimon/write
- variant_p0
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
957 | 957 | | |
958 | 958 | | |
959 | 959 | | |
960 | | - | |
961 | | - | |
962 | | - | |
| 960 | + | |
| 961 | + | |
963 | 962 | | |
964 | 963 | | |
965 | 964 | | |
| |||
1054 | 1053 | | |
1055 | 1054 | | |
1056 | 1055 | | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
| 1056 | + | |
| 1057 | + | |
1060 | 1058 | | |
1061 | 1059 | | |
1062 | 1060 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
117 | | - | |
| 115 | + | |
| 116 | + | |
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 52 | + | |
| 53 | + | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | | - | |
200 | | - | |
| 198 | + | |
| 199 | + | |
201 | 200 | | |
202 | 201 | | |
203 | 202 | | |
| |||
282 | 281 | | |
283 | 282 | | |
284 | 283 | | |
285 | | - | |
286 | | - | |
287 | | - | |
| 284 | + | |
| 285 | + | |
288 | 286 | | |
289 | 287 | | |
290 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
| 205 | + | |
207 | 206 | | |
208 | 207 | | |
209 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
0 commit comments