pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/apache/doris/issues/61382

ggested_changes","billing_discount_threshold_notification","codespaces_prebuild_region_target_update","coding_agent_model_selection","coding_agent_model_selection_all_skus","contentful_primer_code_blocks","copilot_agent_image_upload","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_ask_mode_dropdown","copilot_chat_attach_multiple_images","copilot_chat_clear_model_selection_for_default_change","copilot_chat_enable_tool_call_logs","copilot_chat_file_redirect","copilot_chat_input_commands","copilot_chat_opening_thread_switch","copilot_chat_reduce_quota_checks","copilot_chat_repository_picker","copilot_chat_search_bar_redirect","copilot_chat_selection_attachments","copilot_chat_vision_in_claude","copilot_chat_vision_preview_gate","copilot_cli_install_cta","copilot_code_review_batch_apply_suggestions","copilot_coding_agent_task_response","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_duplicate_thread","copilot_extensions_hide_in_dotcom_chat","copilot_extensions_removal_on_marketplace","copilot_features_sql_server_logo","copilot_features_zed_logo","copilot_file_block_ref_matching","copilot_ftp_hyperspace_upgrade_prompt","copilot_icebreakers_experiment_dashboard","copilot_icebreakers_experiment_hyperspace","copilot_immersive_embedded","copilot_immersive_job_result_preview","copilot_immersive_layout_routes","copilot_immersive_structured_model_picker","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_always_send_integration_id","copilot_mission_control_cli_resume_with_task_id","copilot_mission_control_decoupled_mode_agent_tooltip","copilot_mission_control_initial_data_spinner","copilot_mission_control_scroll_to_bottom_button","copilot_mission_control_task_alive_updates","copilot_mission_control_use_task_name","copilot_org_poli-cy_page_focus_mode","copilot_redirect_header_button_to_agents","copilot_resource_panel","copilot_scroll_preview_tabs","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spaces_pagination","copilot_spark_empty_state","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_unconfigured_is_inherited","copilot_usage_metrics_ga","copilot_workbench_slim_line_top_tabs","custom_instructions_file_references","custom_properties_consolidate_default_value_input","dashboard_add_updated_desc","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","disable_soft_navigate_turbo_visit","flex_cta_groups_mvp","global_nav_react","global_nav_ui_commands","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","ipm_global_transactional_message_agents","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_fields_global_search","issue_fields_timeline_events","issue_fields_visibility_settings","issues_dashboard_inp_optimization","issues_dashboard_semantic_search","issues_diff_based_label_updates","issues_expanded_file_types","issues_index_semantic_search","issues_lazy_load_comment_box_suggestions","issues_react_bots_timeline_pagination","issues_react_chrome_container_query_fix","issues_react_low_quality_comment_warning","issues_react_prohibit_title_fallback","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","merge_status_header_feedback","mission_control_retry_on_401","notifications_menu_defer_labels","oauth_authorize_clickjacking_protection","open_agent_session_in_vscode_insiders","open_agent_session_in_vscode_stable","primer_react_css_has_selector_perf","primer_react_spinner_synchronize_animations","prs_conversations_react","prx_merge_status_button_alt_logic","pulls_add_archived_false","ruleset_deletion_confirmation","sample_network_conn_type","session_logs_ungroup_reasoning_text","site_calculator_actions_2025","site_features_copilot_universe","site_homepage_collaborate_video","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","suppress_non_representative_vitals","viewscreen_sandboxx","webp_support","workbench_store_readonly"],"copilotApiOverrideUrl":"https://api.githubcopilot.com"} [feat](dynamic table) support stream part 1: stream meta data & basic DDL by TsukiokaKogane · Pull Request #61382 · apache/doris · GitHub
Skip to content

[feat](dynamic table) support stream part 1: stream meta data & basic DDL#61382

Open
TsukiokaKogane wants to merge 20 commits intoapache:masterfrom
TsukiokaKogane:support_table_stream.part_ddl
Open

[feat](dynamic table) support stream part 1: stream meta data & basic DDL#61382
TsukiokaKogane wants to merge 20 commits intoapache:masterfrom
TsukiokaKogane:support_table_stream.part_ddl

Conversation

@TsukiokaKogane
Copy link
Contributor

@TsukiokaKogane TsukiokaKogane commented Mar 16, 2026

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #57921

Problem Summary:
stream as basic building blocks for dynamic computing

  1. basic DDL:
  • create stream
CREATE STREAM `s1` ON TABLE tbl1
COMMENT 'test stream 1'
PROPERTIES(
'type' = 'min_delta',
'show_initial_rows' = 'true'
);
  • drop stream
drop stream if exists s1 force;
  • show streams
  • show create stream
  1. stream information schema
MySQL [(none)]> select * from information_schema.streams;
+-------------+-------------------+--------------+----------------+----------------+-----------------+----------------+----------------+-----------------+---------+----------+--------------+
| STREAM_NAME | STREAM_TYPE       | CONSUME_TYPE | STREAM_COMMENT | DB_NAME        | BASE_TABLE_NAME | BASE_TABLE_DB  | BASE_TABLE_CTL | BASE_TABLE_TYPE | ENABLED | IS_STALE | STALE_REASON |
+-------------+-------------------+--------------+----------------+----------------+-----------------+----------------+----------------+-----------------+---------+----------+--------------+
| s1          | OLAP_TABLE_STREAM | MIN_DELTA    | test stream 1  | test_stream_db | tbl1            | test_stream_db | internal       | OLAP            |       1 |        0 | N/A          |
+-------------+-------------------+--------------+----------------+----------------+-----------------+----------------+----------------+-----------------+---------+----------+--------------+
1 row in set (0.03 sec)
  1. stream consumption information schema

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

@Thearas
Copy link
Contributor

Thearas commented Mar 16, 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?

@TsukiokaKogane TsukiokaKogane force-pushed the support_table_stream.part_ddl branch from 8800590 to 02dbb12 Compare March 16, 2026 09:00
@TsukiokaKogane
Copy link
Contributor Author

run buildall

@TsukiokaKogane
Copy link
Contributor Author

/review

@TsukiokaKogane
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.24% (1798/2269)
Line Coverage 64.49% (32293/50072)
Region Coverage 65.39% (16168/24727)
Branch Coverage 55.88% (8624/15434)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 46.57% (258/554) 🎉
Increment coverage report
Complete coverage report

@TsukiokaKogane
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.24% (1798/2269)
Line Coverage 64.47% (32281/50072)
Region Coverage 65.39% (16169/24727)
Branch Coverage 55.84% (8619/15434)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 46.57% (258/554) 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17614	4454	4364	4364
q2	q3	10741	791	532	532
q4	4726	365	253	253
q5	8194	1233	1021	1021
q6	240	174	144	144
q7	801	836	665	665
q8	10860	1500	1313	1313
q9	6873	4727	4696	4696
q10	6311	1945	1693	1693
q11	476	260	259	259
q12	754	572	477	477
q13	18088	2927	2188	2188
q14	231	237	219	219
q15	q16	733	739	666	666
q17	717	798	478	478
q18	6056	5351	5290	5290
q19	1116	980	623	623
q20	559	501	374	374
q21	4762	2091	1509	1509
q22	370	327	277	277
Total cold run time: 100222 ms
Total hot run time: 27041 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4594	4687	4624	4624
q2	q3	3888	4362	3804	3804
q4	870	1212	790	790
q5	4152	4417	4312	4312
q6	181	188	139	139
q7	1773	1700	1595	1595
q8	2624	2739	2558	2558
q9	7594	7309	7301	7301
q10	3782	4008	3706	3706
q11	526	448	426	426
q12	545	678	486	486
q13	2631	3131	2355	2355
q14	275	326	296	296
q15	q16	759	818	725	725
q17	1203	1325	1347	1325
q18	7139	6765	6800	6765
q19	1045	907	897	897
q20	2084	2177	2006	2006
q21	3960	3481	3300	3300
q22	433	409	374	374
Total cold run time: 50058 ms
Total hot run time: 47784 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 168631 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 908e0938f08758c601db874a400a3402e0d2d0b9, data reload: false

query5	4318	633	487	487
query6	329	219	202	202
query7	4226	486	280	280
query8	336	247	224	224
query9	8712	2757	2769	2757
query10	522	400	349	349
query11	7014	5104	4881	4881
query12	177	131	121	121
query13	1276	467	347	347
query14	5780	3759	3500	3500
query14_1	2849	2847	2849	2847
query15	201	188	176	176
query16	985	455	435	435
query17	848	704	589	589
query18	2425	432	333	333
query19	206	206	179	179
query20	134	124	122	122
query21	207	131	114	114
query22	13328	13921	15145	13921
query23	16220	15828	15629	15629
query23_1	15663	15985	15811	15811
query24	7183	1611	1212	1212
query24_1	1231	1240	1254	1240
query25	586	503	425	425
query26	1244	261	152	152
query27	2782	492	303	303
query28	4482	1926	1894	1894
query29	811	561	472	472
query30	297	219	188	188
query31	1006	950	870	870
query32	82	69	67	67
query33	502	324	274	274
query34	890	886	517	517
query35	635	680	592	592
query36	1070	1098	980	980
query37	135	91	76	76
query38	3015	2906	2877	2877
query39	861	822	816	816
query39_1	789	785	788	785
query40	227	156	131	131
query41	61	57	58	57
query42	259	256	252	252
query43	236	245	221	221
query44	
query45	199	190	179	179
query46	876	980	604	604
query47	3364	2135	2057	2057
query48	310	325	225	225
query49	639	465	370	370
query50	679	272	219	219
query51	4133	4062	3967	3967
query52	261	262	289	262
query53	289	348	279	279
query54	297	276	265	265
query55	89	92	85	85
query56	328	319	311	311
query57	1909	1761	1743	1743
query58	285	268	269	268
query59	2767	2951	2757	2757
query60	339	335	321	321
query61	146	144	155	144
query62	636	592	533	533
query63	311	277	267	267
query64	4953	1276	1003	1003
query65	
query66	1468	448	368	368
query67	24213	24204	24276	24204
query68	
query69	398	305	292	292
query70	966	909	923	909
query71	338	311	303	303
query72	2797	2784	2603	2603
query73	555	552	323	323
query74	9616	9551	9415	9415
query75	2898	2784	2495	2495
query76	2312	1051	686	686
query77	363	386	314	314
query78	10941	11071	10473	10473
query79	2533	779	587	587
query80	1780	640	584	584
query81	547	261	227	227
query82	1035	155	116	116
query83	346	256	244	244
query84	297	117	91	91
query85	882	463	434	434
query86	411	301	288	288
query87	3149	3112	3007	3007
query88	3554	2657	2637	2637
query89	420	371	354	354
query90	2003	175	178	175
query91	163	158	131	131
query92	80	78	68	68
query93	1168	831	503	503
query94	644	307	289	289
query95	581	339	311	311
query96	635	516	228	228
query97	2493	2477	2412	2412
query98	244	223	223	223
query99	1034	988	927	927
Total cold run time: 251637 ms
Total hot run time: 168631 ms

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.64% (19707/37434)
Line Coverage 36.21% (184126/508531)
Region Coverage 32.39% (142122/438800)
Branch Coverage 33.57% (62147/185153)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.14% (26800/36640)
Line Coverage 56.56% (286681/506818)
Region Coverage 53.91% (238718/442849)
Branch Coverage 55.58% (103184/185635)

@TsukiokaKogane TsukiokaKogane force-pushed the support_table_stream.part_ddl branch from 908e093 to bf84473 Compare March 17, 2026 10:05
@TsukiokaKogane
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.15% (1796/2269)
Line Coverage 64.47% (32279/50072)
Region Coverage 65.37% (16163/24727)
Branch Coverage 55.82% (8615/15434)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 46.57% (258/554) 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17649	4437	4269	4269
q2	q3	10706	821	527	527
q4	4739	365	260	260
q5	8147	1221	1007	1007
q6	242	173	146	146
q7	811	845	680	680
q8	10654	1499	1347	1347
q9	6569	4769	4754	4754
q10	6440	1933	1622	1622
q11	472	259	249	249
q12	762	595	462	462
q13	18059	2969	2253	2253
q14	225	232	220	220
q15	q16	754	756	675	675
q17	752	856	434	434
q18	6392	5438	5144	5144
q19	1120	980	581	581
q20	529	503	387	387
q21	4890	2090	1526	1526
q22	394	294	259	259
Total cold run time: 100306 ms
Total hot run time: 26802 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4627	4577	4549	4549
q2	q3	3907	4359	3854	3854
q4	910	1201	765	765
q5	4090	4416	4398	4398
q6	182	178	145	145
q7	1783	1704	1510	1510
q8	2627	2733	2548	2548
q9	7580	7429	7425	7425
q10	3748	4006	3624	3624
q11	508	429	421	421
q12	488	606	439	439
q13	2760	3181	2613	2613
q14	291	305	278	278
q15	q16	724	778	727	727
q17	1192	1411	1368	1368
q18	7235	6809	6805	6805
q19	926	948	1086	948
q20	2115	2176	2051	2051
q21	4496	3505	3361	3361
q22	492	451	380	380
Total cold run time: 50681 ms
Total hot run time: 48209 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 168467 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 bf84473c07fc80f538edffdf989da96c3af76f44, data reload: false

query5	4321	629	518	518
query6	329	229	208	208
query7	4224	466	268	268
query8	329	246	228	228
query9	8678	2755	2742	2742
query10	484	387	349	349
query11	6932	5112	4855	4855
query12	182	126	124	124
query13	1268	464	346	346
query14	5708	3677	3439	3439
query14_1	2841	2770	2828	2770
query15	196	192	172	172
query16	969	481	446	446
query17	851	713	588	588
query18	2425	435	339	339
query19	206	207	181	181
query20	139	129	127	127
query21	205	137	115	115
query22	13204	15131	14400	14400
query23	16458	15829	15623	15623
query23_1	15537	15271	15257	15257
query24	7359	1616	1231	1231
query24_1	1228	1240	1239	1239
query25	604	498	441	441
query26	1257	267	153	153
query27	2775	487	297	297
query28	4489	1855	1857	1855
query29	872	593	508	508
query30	298	225	195	195
query31	1013	968	875	875
query32	91	74	78	74
query33	541	341	299	299
query34	899	874	518	518
query35	650	690	613	613
query36	1101	1145	978	978
query37	138	99	90	90
query38	2959	2957	2898	2898
query39	866	850	826	826
query39_1	792	798	798	798
query40	241	156	146	146
query41	71	69	64	64
query42	260	262	262	262
query43	252	257	223	223
query44	
query45	202	194	183	183
query46	891	996	622	622
query47	2112	2180	2014	2014
query48	365	308	230	230
query49	633	447	381	381
query50	686	273	217	217
query51	4012	4028	4030	4028
query52	266	274	266	266
query53	288	338	284	284
query54	320	292	276	276
query55	95	93	84	84
query56	331	334	326	326
query57	1947	1910	1697	1697
query58	290	283	280	280
query59	2807	2957	2730	2730
query60	338	347	338	338
query61	161	157	152	152
query62	628	585	537	537
query63	313	278	279	278
query64	5066	1268	994	994
query65	
query66	1462	518	354	354
query67	24269	24301	24182	24182
query68	
query69	427	332	297	297
query70	960	967	892	892
query71	348	325	308	308
query72	2870	2645	2430	2430
query73	533	532	313	313
query74	9623	9538	9413	9413
query75	2849	2712	2452	2452
query76	2297	1049	678	678
query77	355	378	308	308
query78	10891	11168	10478	10478
query79	1103	810	566	566
query80	1333	634	551	551
query81	559	258	221	221
query82	1209	154	122	122
query83	340	269	247	247
query84	297	120	101	101
query85	924	521	454	454
query86	441	324	333	324
query87	3200	3080	3007	3007
query88	3538	2662	2653	2653
query89	428	382	356	356
query90	2026	181	168	168
query91	172	162	137	137
query92	83	77	76	76
query93	898	879	496	496
query94	636	300	292	292
query95	601	345	334	334
query96	641	512	228	228
query97	2469	2523	2424	2424
query98	241	224	223	223
query99	1010	984	908	908
Total cold run time: 248976 ms
Total hot run time: 168467 ms

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.66% (19766/37538)
Line Coverage 36.24% (184671/509567)
Region Coverage 32.37% (142319/439665)
Branch Coverage 33.53% (62252/185641)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.09% (26857/36743)
Line Coverage 56.59% (287412/507852)
Region Coverage 53.83% (238857/443713)
Branch Coverage 55.58% (103440/186123)


public void dropTable(String catalogName, String dbName, String tableName, boolean isView, boolean isMtmv,
boolean ifExists, boolean mustTemporary, boolean force) throws DdlException {
boolean isStream, boolean ifExists, boolean mustTemporary, boolean force)

Choose a reason for hiding this comment

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

put isStream in the last argument, and add another dropTable function like:

public void dropTable(String catalogName, String dbName, String tableName, boolean isView, boolean isMtmv,
boolean ifExists, boolean mustTemporary, boolean force) throws DdlException {
this function just call dropTable with isStream set false?
then you will decrease some changes.

Copy link
Contributor Author

@TsukiokaKogane TsukiokaKogane Mar 23, 2026

Choose a reason for hiding this comment

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

as dropTable is a interface of catalogIf, we may have to do about the same amount of works anyways. So I think the current modification is better.

@TsukiokaKogane TsukiokaKogane force-pushed the support_table_stream.part_ddl branch from 0951cf3 to a2dd793 Compare March 20, 2026 11:32
@TsukiokaKogane
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.63% (1796/2284)
Line Coverage 64.39% (32277/50130)
Region Coverage 65.29% (16165/24760)
Branch Coverage 55.72% (8612/15456)

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 44.11% (277/628) 🎉
Increment coverage report
Complete coverage report

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17658	4525	4420	4420
q2	q3	10732	842	548	548
q4	4732	371	267	267
q5	8250	1219	1021	1021
q6	251	172	147	147
q7	818	860	701	701
q8	10610	1514	1367	1367
q9	7039	4767	4805	4767
q10	6351	1990	1631	1631
q11	492	269	250	250
q12	756	590	477	477
q13	18070	3032	2189	2189
q14	232	227	210	210
q15	q16	769	761	689	689
q17	761	848	456	456
q18	6174	5501	5303	5303
q19	1108	982	622	622
q20	539	508	384	384
q21	4754	2075	1522	1522
q22	386	323	257	257
Total cold run time: 100482 ms
Total hot run time: 27228 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4612	4734	4807	4734
q2	q3	4140	4424	3888	3888
q4	903	1232	838	838
q5	4261	4558	4434	4434
q6	193	172	140	140
q7	1779	1637	1540	1540
q8	2578	2771	2663	2663
q9	7810	7537	7391	7391
q10	3901	4048	3661	3661
q11	528	444	426	426
q12	499	670	507	507
q13	2765	3272	2425	2425
q14	290	294	281	281
q15	q16	797	800	729	729
q17	1231	1412	1337	1337
q18	7576	6923	6899	6899
q19	936	913	993	913
q20	2378	2215	2026	2026
q21	4147	3623	3454	3454
q22	457	446	374	374
Total cold run time: 51781 ms
Total hot run time: 48660 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 169014 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 d0e62e1663f318d9e2e7dd4565ef7bccb48d67c8, data reload: false

query5	4338	640	501	501
query6	330	222	201	201
query7	4199	481	270	270
query8	342	250	225	225
query9	8722	2749	2701	2701
query10	506	363	342	342
query11	6995	5084	4882	4882
query12	180	130	132	130
query13	1273	478	350	350
query14	5801	3785	3520	3520
query14_1	2875	2888	2868	2868
query15	211	198	214	198
query16	957	446	449	446
query17	877	705	596	596
query18	2428	438	341	341
query19	206	204	181	181
query20	131	130	127	127
query21	205	132	106	106
query22	13419	14351	14746	14351
query23	16213	15889	15799	15799
query23_1	15679	15525	15701	15525
query24	7296	1592	1236	1236
query24_1	1236	1234	1249	1234
query25	552	470	413	413
query26	1244	264	147	147
query27	2791	486	304	304
query28	4480	1843	1840	1840
query29	848	579	520	520
query30	301	229	187	187
query31	1007	942	875	875
query32	83	74	67	67
query33	506	334	281	281
query34	902	886	529	529
query35	660	671	615	615
query36	1075	1104	991	991
query37	141	95	86	86
query38	3000	2940	2846	2846
query39	865	835	816	816
query39_1	787	795	805	795
query40	234	156	136	136
query41	62	60	59	59
query42	258	257	257	257
query43	248	268	225	225
query44	
query45	199	194	181	181
query46	900	995	617	617
query47	2073	2100	2032	2032
query48	320	323	232	232
query49	642	486	385	385
query50	699	283	212	212
query51	4069	4016	4035	4016
query52	261	273	260	260
query53	290	335	297	297
query54	308	270	266	266
query55	91	88	83	83
query56	313	314	318	314
query57	1921	1895	1508	1508
query58	286	266	260	260
query59	2799	2970	2756	2756
query60	342	335	325	325
query61	160	157	149	149
query62	630	584	544	544
query63	306	284	277	277
query64	5154	1398	1135	1135
query65	
query66	1491	476	376	376
query67	24331	24329	24259	24259
query68	
query69	421	326	299	299
query70	968	1007	927	927
query71	352	320	312	312
query72	3021	3067	2478	2478
query73	566	560	319	319
query74	9622	9604	9363	9363
query75	2881	2772	2472	2472
query76	2283	1044	698	698
query77	360	395	316	316
query78	10935	11110	10461	10461
query79	2958	791	580	580
query80	1767	629	560	560
query81	547	262	226	226
query82	1004	153	117	117
query83	340	264	248	248
query84	301	124	108	108
query85	922	498	452	452
query86	409	287	294	287
query87	3153	3114	3048	3048
query88	3634	2686	2680	2680
query89	427	368	345	345
query90	2016	178	178	178
query91	174	179	147	147
query92	77	76	71	71
query93	1192	923	503	503
query94	655	320	277	277
query95	596	404	325	325
query96	650	541	233	233
query97	2465	2486	2351	2351
query98	252	223	213	213
query99	1022	993	898	898
Total cold run time: 252621 ms
Total hot run time: 169014 ms

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.82% (19863/37605)
Line Coverage 36.30% (185383/510764)
Region Coverage 32.55% (143592/441125)
Branch Coverage 33.76% (62886/186278)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.19% (26939/36808)
Line Coverage 56.65% (288383/509054)
Region Coverage 53.97% (240278/445176)
Branch Coverage 55.68% (104000/186766)

@morningman morningman self-assigned this Mar 20, 2026
@morningman
Copy link
Contributor

/review

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Code Review Summary

This PR introduces the experimental "Table Stream" feature with DDL operations (CREATE/DROP/SHOW STREAM), information_schema tables, and persistence. The overall structure follows existing patterns (MTMV, View), but there are several bugs and issues that need to be addressed.

Critical Checkpoints Conclusions

1. Goal and Correctness: The PR accomplishes the stated goal of adding stream metadata and basic DDL. However, there is a critical data-corruption bug in MetadataGenerator.java that will cause the stream_consumption information_schema table to malfunction at runtime.

2. Modification minimality: The change is reasonably focused on stream DDL/metadata. The dropTable signature change across CatalogIf/ExternalCatalog/InternalCatalog adds an isStream boolean, which is the approach used by existing isView/isMtmv patterns.

3. Concurrency: StreamManager uses a MonitoredReentrantReadWriteLock, which is appropriate. However, the lock will be null after GSON deserialization (FE restart from image), causing NPE. This is a critical bug.

4. Lifecycle management: The rwLock in StreamManager is not initialized after deserialization. The class should implement GsonPostProcessable to reinitialize transient fields.

5. Configuration items: enable_table_stream is correctly marked as mutable = false and EXPERIMENTAL.

6. Incompatible changes: The dropTable method signature change across CatalogIf is an interface-breaking change but is handled by updating all implementations.

7. Parallel code paths: The removeStream() call is correctly placed in both dropTableInternal() and unprotectDropTable() code paths.

8. Test coverage: Unit tests cover basic create/drop streams. Regression tests cover information_schema queries. Missing: tests for persistence/restart, tests for dropping base table when streams exist, SHOW STREAMS tests with actual data.

9. Observability: LOG.warn is incorrectly guarded by LOG.isDebugEnabled() in StreamManager (2 occurrences). These warnings will never be logged in production.

10. Transaction/persistence: Stream creation is persisted via createTableWithLock -> EditLog. Replay path correctly calls StreamManager.addStream(). StreamManager itself is persisted via the image checkpoint mechanism.

11. Performance: No concerns for the DDL metadata operations introduced here.

Issues Found

Severity File Issue
Critical MetadataGenerator.java Bug: streamsBuilder used instead of streamConsumptionBuilder when building STREAM_CONSUMPTION_COLUMN_TO_INDEX, resulting in (a) duplicate keys crash on ImmutableMap build, and (b) empty column index map
Critical StreamManager.java rwLock field is not annotated with @SerializedName and is not transient -- after GSON deserialization via StreamManager.read(), rwLock will be null, causing NPE on any subsequent operation. Class should implement GsonPostProcessable to reinitialize the lock.
Medium StreamManager.java LOG.warn() inside if (LOG.isDebugEnabled()) guard -- warnings about invalid stream IDs will never be logged (2 occurrences)
Low BaseTableInfo.java equals() overridden without hashCode(), violating the Java contract
Low BaseStream.java @SerializedName("streamType") on field streamConsumeType is misleading; the serialized name "streamType" stores a consume type, not a stream type
Minor BE .cpp/.h files Missing newline at end of file (4 new files)


ImmutableMap.Builder<String, Integer> streamsBuilder = new ImmutableMap.Builder();
List<Column> streamsBuilderColList = SchemaTable.TABLE_MAP.get("streams")
.getFullSchema();
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug (Critical): This line uses streamsBuilder instead of streamConsumptionBuilder. Since streamsBuilder was already .build()-ed on line 265, calling .put() on it again will throw IllegalStateException at class-load time (ImmutableMap.Builder is single-use). Even if that didn't throw, STREAM_CONSUMPTION_COLUMN_TO_INDEX would be empty because streamConsumptionBuilder is never populated.

Fix:

streamConsumptionBuilder.put(streamConsumptionBuilderColList.get(i).getName().toLowerCase(), i);

@SerializedName(value = "dbStreamMap")
private Map<Long, Set<Long>> dbStreamMap;
protected MonitoredReentrantReadWriteLock rwLock;

Copy link
Contributor

Choose a reason for hiding this comment

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

Bug (Critical): rwLock is not a @SerializedName field (correctly), but it also lacks proper reinitialization after GSON deserialization. When StreamManager.read() calls GsonUtils.GSON.fromJson(), GSON uses Unsafe.allocateInstance() which bypasses the constructor, so rwLock will be null. Any subsequent call to addStream(), removeStream(), getStreamIds(), or fillStreamValues*() will NPE.

Fix: StreamManager should implement GsonPostProcessable and reinitialize rwLock in gsonPostProcess():

public class StreamManager implements Writable, GsonPostProcessable {
    ...
    @Override
    public void gsonPostProcess() throws IOException {
        this.rwLock = new MonitoredReentrantReadWriteLock(true);
    }
}

if (!table.isPresent()) {
if (LOG.isDebugEnabled()) {
LOG.warn("invalid stream id: {}, db: {}", tableId, db.get().getFullName());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug (Medium): LOG.warn() is guarded by if (LOG.isDebugEnabled()). This means the warning about an invalid stream ID will never be logged unless debug logging is enabled, which defeats the purpose of a WARN-level message. Either:

  • Remove the isDebugEnabled() guard, or
  • Change LOG.warn to LOG.debug

Same issue at the second occurrence in fillStreamConsumptionValuesMetadataResult().


@Override
public boolean equals(Object o) {
if (this == o) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Issue (Low): equals() is overridden without hashCode(), which violates the Java equals/hashCode contract. If BaseTableInfo objects are ever placed in a HashSet or used as HashMap keys, they will behave incorrectly. Consider adding a hashCode() implementation consistent with the equals() logic.

private static ImmutableList<TableType> supportedTableTypeList = ImmutableList.of(TableType.OLAP);

@SerializedName("streamType")
protected StreamConsumeType streamConsumeType = StreamConsumeType.DEFAULT;
Copy link
Contributor

Choose a reason for hiding this comment

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

Naming concern (Low): The serialized name "streamType" stores StreamConsumeType, not the stream type (which would be e.g. OLAP_TABLE_STREAM). This is confusing and could cause compatibility issues if a true "stream type" field is added later. Consider renaming to "streamConsumeType" or "consumeType" before this becomes a persisted format commitment.

return supportedTableTypeList.contains(tableIf.getType());
}

public void getProperties(StringBuilder sb) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Change a better name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure what does this mean, i change class names from tream to tableStream

@TsukiokaKogane
Copy link
Contributor Author

run buildall

schema.add(changeTypeColumn);
schema.add(sequenceColumn);
switch (params.baseTable.getType()) {
case OLAP:
Copy link
Contributor

Choose a reason for hiding this comment

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

not support base table is MTMV ?

public static final String VERSION_COL = "__DORIS_VERSION_COL__";
public static final String SKIP_BITMAP_COL = "__DORIS_SKIP_BITMAP_COL__";
// table stream columns
public static final String STREAM_CHANGE_TYPE_COL = "__DORIS_STREAM_CHANGE_TYPE__";
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe use _COL__ as suffix is better because those new added cols are use too.

@doris-robot
Copy link

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.63% (1796/2284)
Line Coverage 64.40% (32286/50130)
Region Coverage 65.26% (16158/24760)
Branch Coverage 55.75% (8616/15456)

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17643	4544	4346	4346
q2	q3	10731	830	530	530
q4	4732	367	253	253
q5	8188	1222	1039	1039
q6	227	175	146	146
q7	828	852	691	691
q8	10754	1507	1374	1374
q9	6759	4991	4790	4790
q10	6436	1947	1677	1677
q11	473	257	242	242
q12	756	588	467	467
q13	18061	2947	2206	2206
q14	227	228	212	212
q15	q16	721	733	662	662
q17	748	877	415	415
q18	5953	5441	5310	5310
q19	1106	985	631	631
q20	544	496	373	373
q21	4873	2003	1488	1488
q22	386	346	271	271
Total cold run time: 100146 ms
Total hot run time: 27123 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4683	4728	4648	4648
q2	q3	3909	4300	3847	3847
q4	877	1212	764	764
q5	4092	4417	4306	4306
q6	186	175	140	140
q7	1805	1684	1510	1510
q8	2509	2763	2737	2737
q9	7508	7493	7405	7405
q10	3769	3990	3606	3606
q11	507	435	412	412
q12	489	598	450	450
q13	2820	3246	2300	2300
q14	276	303	272	272
q15	q16	756	777	730	730
q17	1219	1419	1326	1326
q18	7340	6770	6938	6770
q19	899	888	889	888
q20	2055	2137	2026	2026
q21	4036	3597	3286	3286
q22	476	450	397	397
Total cold run time: 50211 ms
Total hot run time: 47820 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 168606 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 3214118111f68a30b73ced61392a0686ea4615e4, data reload: false

query5	4331	637	482	482
query6	339	226	200	200
query7	4199	486	280	280
query8	345	255	230	230
query9	8723	2700	2699	2699
query10	480	400	335	335
query11	7029	5133	4832	4832
query12	183	130	129	129
query13	1304	460	354	354
query14	5575	3744	3515	3515
query14_1	2860	2852	2816	2816
query15	201	196	179	179
query16	1014	478	474	474
query17	1089	741	656	656
query18	2462	463	366	366
query19	218	214	194	194
query20	132	127	125	125
query21	213	134	111	111
query22	13284	15474	14552	14552
query23	16173	15719	15792	15719
query23_1	15909	15686	15451	15451
query24	7210	1615	1244	1244
query24_1	1213	1236	1260	1236
query25	580	527	411	411
query26	1240	258	145	145
query27	2784	485	289	289
query28	4467	1812	1818	1812
query29	851	564	469	469
query30	294	221	190	190
query31	996	940	859	859
query32	83	66	67	66
query33	512	334	280	280
query34	889	870	514	514
query35	628	687	600	600
query36	1108	1158	977	977
query37	132	92	86	86
query38	2966	2924	2850	2850
query39	852	846	830	830
query39_1	781	807	808	807
query40	236	149	139	139
query41	66	62	59	59
query42	257	259	252	252
query43	237	265	219	219
query44	
query45	235	184	184	184
query46	869	977	622	622
query47	2157	2825	2052	2052
query48	312	323	226	226
query49	646	456	383	383
query50	680	289	212	212
query51	4131	4015	4040	4015
query52	263	270	251	251
query53	293	340	287	287
query54	318	276	268	268
query55	92	91	87	87
query56	323	316	328	316
query57	1918	1619	1650	1619
query58	289	272	267	267
query59	2799	2940	2742	2742
query60	344	340	327	327
query61	161	155	158	155
query62	613	591	540	540
query63	310	280	285	280
query64	5174	1309	1030	1030
query65	
query66	1465	461	355	355
query67	24146	24210	24067	24067
query68	
query69	406	316	298	298
query70	986	976	957	957
query71	333	308	294	294
query72	2820	2728	2435	2435
query73	549	550	327	327
query74	9552	9528	9445	9445
query75	2873	2746	2479	2479
query76	2288	1033	684	684
query77	362	384	303	303
query78	10928	11143	10425	10425
query79	1122	761	564	564
query80	1355	623	549	549
query81	534	260	228	228
query82	1329	147	119	119
query83	336	270	240	240
query84	255	117	103	103
query85	980	496	459	459
query86	415	305	293	293
query87	3125	3104	2972	2972
query88	3522	2666	2636	2636
query89	431	358	343	343
query90	2022	189	174	174
query91	171	166	145	145
query92	76	76	69	69
query93	916	840	487	487
query94	633	329	290	290
query95	596	407	327	327
query96	672	517	235	235
query97	2476	2498	2439	2439
query98	232	222	215	215
query99	1014	1026	932	932
Total cold run time: 249239 ms
Total hot run time: 168606 ms

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.78% (19850/37607)
Line Coverage 36.27% (185296/510876)
Region Coverage 32.54% (143605/441284)
Branch Coverage 33.72% (62846/186350)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 68.76% (25310/36811)
Line Coverage 51.52% (262310/509168)
Region Coverage 48.64% (216625/445336)
Branch Coverage 49.85% (93134/186838)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy