Skip to content

[fix](variant) fix variant column data_serdes not synced #60908

Open
csun5285 wants to merge 1 commit intoapache:masterfrom
csun5285:fix_mv_variant
Open

[fix](variant) fix variant column data_serdes not synced #60908
csun5285 wants to merge 1 commit intoapache:masterfrom
csun5285:fix_mv_variant

Conversation

@csun5285
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

…array_nullable and ensure_root_node_type

When `wrapp_array_nullable()` wraps a ColumnArray with ColumnNullable, it updates
`data_types[0]` but not `data_serdes[0]`, leaving a stale serde.

Similarly, `ensure_root_node_type()` casts the root column (e.g. INT32 -> JSONB)
and updates `data[0]` and `data_types[0]`, but not `data_serdes[0]`.

This causes BE crash during MV refresh with row store enabled: when
`serialize_text_json()` uses the stale `data_serdes[0]` (e.g. INT32 serde) on
the actual column data (e.g. JSONB ColumnString), `assert_cast` fails.

Fix: sync `data_serdes[0]` in both `wrapp_array_nullable()` and
`ensure_root_node_type()` after updating `data_types[0]`.
@Thearas
Copy link
Contributor

Thearas commented Feb 28, 2026

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@csun5285
Copy link
Contributor Author

run buildall

Copy link
Member

@eldenmoon eldenmoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eldenmoon eldenmoon added dev/4.0.x usercase Important user case type label labels Feb 28, 2026
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Feb 28, 2026
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@doris-robot
Copy link

TPC-H: Total hot run time: 28883 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit be49be12cf00161b966d1cb6b61f3e7a6dab8e67, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17688	4562	4320	4320
q2	q3	10640	822	534	534
q4	4680	362	261	261
q5	7646	1194	999	999
q6	194	174	147	147
q7	819	841	678	678
q8	10374	1475	1359	1359
q9	5474	4675	4695	4675
q10	6866	1895	1632	1632
q11	458	266	243	243
q12	757	568	484	484
q13	17801	4237	3430	3430
q14	233	225	213	213
q15	997	806	790	790
q16	770	728	676	676
q17	778	904	427	427
q18	6350	5422	5375	5375
q19	1365	982	611	611
q20	510	495	402	402
q21	4540	1846	1381	1381
q22	339	290	246	246
Total cold run time: 99279 ms
Total hot run time: 28883 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4540	4361	4371	4361
q2	q3	1772	2188	1724	1724
q4	872	1151	752	752
q5	4033	4306	4335	4306
q6	178	178	141	141
q7	1740	1611	1483	1483
q8	2437	2688	2544	2544
q9	7782	7433	7643	7433
q10	2655	2870	2450	2450
q11	528	453	424	424
q12	502	612	477	477
q13	3942	4421	3606	3606
q14	292	306	279	279
q15	893	835	867	835
q16	693	764	726	726
q17	1173	1504	1316	1316
q18	7062	6731	6531	6531
q19	925	871	968	871
q20	2055	2191	1994	1994
q21	4181	3553	3355	3355
q22	454	440	389	389
Total cold run time: 48709 ms
Total hot run time: 45997 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 184167 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit be49be12cf00161b966d1cb6b61f3e7a6dab8e67, data reload: false

query5	4805	636	534	534
query6	325	221	218	218
query7	4218	476	278	278
query8	350	252	235	235
query9	8751	2771	2777	2771
query10	551	390	336	336
query11	17073	16936	16576	16576
query12	195	131	135	131
query13	1272	461	351	351
query14	6577	3210	2988	2988
query14_1	2811	2792	2793	2792
query15	205	195	184	184
query16	991	384	459	384
query17	1062	706	615	615
query18	2693	445	342	342
query19	212	206	187	187
query20	133	132	132	132
query21	221	145	125	125
query22	5063	5723	5407	5407
query23	17559	17303	16964	16964
query23_1	17008	17006	16893	16893
query24	7221	1657	1231	1231
query24_1	1231	1234	1240	1234
query25	568	506	432	432
query26	1241	265	158	158
query27	2757	526	279	279
query28	4477	1898	1861	1861
query29	804	564	465	465
query30	307	234	205	205
query31	870	715	651	651
query32	81	73	68	68
query33	508	333	282	282
query34	920	918	571	571
query35	626	668	603	603
query36	1078	1142	993	993
query37	130	92	85	85
query38	2962	2917	2884	2884
query39	876	847	850	847
query39_1	819	829	826	826
query40	230	152	131	131
query41	64	61	59	59
query42	108	103	101	101
query43	371	383	367	367
query44	
query45	193	187	181	181
query46	906	988	607	607
query47	2113	2165	2038	2038
query48	300	324	227	227
query49	662	481	405	405
query50	679	289	213	213
query51	4078	4088	4080	4080
query52	103	106	103	103
query53	288	336	283	283
query54	295	262	259	259
query55	93	88	81	81
query56	308	335	319	319
query57	1363	1336	1257	1257
query58	291	279	274	274
query59	2583	2689	2579	2579
query60	334	336	312	312
query61	148	144	147	144
query62	604	595	538	538
query63	315	277	275	275
query64	4852	1271	989	989
query65	
query66	1383	454	352	352
query67	16302	16293	16297	16293
query68	
query69	401	314	283	283
query70	955	971	960	960
query71	334	309	290	290
query72	2881	2686	2362	2362
query73	529	544	323	323
query74	10081	9885	9780	9780
query75	2837	2755	2461	2461
query76	2299	1044	708	708
query77	365	377	318	318
query78	11171	11323	10673	10673
query79	3094	811	621	621
query80	1790	637	534	534
query81	592	280	252	252
query82	984	150	116	116
query83	328	277	268	268
query84	259	119	100	100
query85	910	498	437	437
query86	490	322	312	312
query87	3099	3125	2993	2993
query88	3561	2689	2675	2675
query89	422	363	343	343
query90	1975	178	176	176
query91	164	151	140	140
query92	84	77	70	70
query93	1360	806	499	499
query94	640	313	295	295
query95	594	399	317	317
query96	630	506	226	226
query97	2464	2490	2363	2363
query98	236	224	214	214
query99	991	981	921	921
Total cold run time: 256380 ms
Total hot run time: 184167 ms

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 50.00% (1/2) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.53% (19582/37275)
Line Coverage 36.17% (182832/505491)
Region Coverage 32.51% (141992/436786)
Branch Coverage 33.48% (61574/183913)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 50.00% (1/2) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.24% (26738/36508)
Line Coverage 56.52% (284848/503997)
Region Coverage 53.94% (237858/440962)
Branch Coverage 55.60% (102594/184505)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.0.x reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants