Skip to content

[feat](fe) Support named bloom filter indexes in DDL and schema change#64652

Open
hoshinojyunn wants to merge 1 commit into
apache:masterfrom
hoshinojyunn:master
Open

[feat](fe) Support named bloom filter indexes in DDL and schema change#64652
hoshinojyunn wants to merge 1 commit into
apache:masterfrom
hoshinojyunn:master

Conversation

@hoshinojyunn

@hoshinojyunn hoshinojyunn commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: N/A

Related PR: N/A

Problem Summary:

Doris historically manages Bloom Filter columns through table properties:

  • bloom_filter_columns
  • bloom_filter_fpp

That creates several gaps:

  1. Bloom Filter indexes cannot be created or dropped with normal named-index syntax.
  2. Named Bloom Filter metadata and legacy table-property metadata must coexist during migration.
  3. FE display paths and FE->BE materialization paths need to recognize both metadata forms.
  4. Named Bloom Filter indexes need per-index bloom_filter_fpp instead of relying on the legacy table-level property model.

This PR adds named USING BLOOMFILTER support while keeping compatibility with legacy bloom_filter_columns. A named Bloom Filter index and a legacy BF column cannot be defined on the same column, but they can coexist on different columns.

Assumption / semantic boundary:

A named bloom filter index and a property-managed bloom filter index cannot be

defined on the same column. The two metadata forms are managed separately, and

users must use DROP INDEX for named bloom filter indexes and

ALTER TABLE SET("bloom_filter_columns" = ...) for property-managed bloom

filter indexes.

Main changes

  1. Parser and analysis

    • Add BLOOMFILTER syntax in Nereids for inline index definitions, CREATE INDEX, and ALTER TABLE ... ADD INDEX.
    • Allow index-level PROPERTIES("bloom_filter_fpp" = "...") on named Bloom Filter indexes.
    • Validate BF-compatible column types and reject conflicts between legacy BF columns and named BF indexes on the same column.
  2. FE metadata and DDL semantics

    • Keep named BLOOMFILTER indexes in table/index metadata and keep legacy bloom_filter_columns compatibility.
    • Add helpers for extracting named BF columns, conflict checking, and normalized legacy BF handling across schema change / replay / rename / drop-column flows.
    • Update signature handling so named-only BF bloom_filter_fpp differences are visible in schema comparison.
    • Preserve separate management semantics:
      • named BF: CREATE INDEX / ADD INDEX / DROP INDEX
      • legacy BF columns: ALTER TABLE SET ("bloom_filter_columns" = ...)
  3. FE -> BE materialization

    • Materialize BF flags from either legacy BF columns or named BLOOMFILTER indexes in thrift tablet schema creation, protobuf/cloud tablet meta creation, and create-replica paths.
    • Match shadow columns by non-shadow names so named BF metadata survives schema-change shadow schemas.
    • Keep per-column FPP resolution consistent on BE:
      • named BF with index property: use index-level bloom_filter_fpp
      • named BF without index property: use default BF FPP
      • legacy BF columns: use table-level bloom_filter_fpp
  4. Display / observability

    • Update SHOW PROC / DESC BF presentation to display both legacy BF columns and named BLOOMFILTER columns.
  5. Tests

  • Add FE parser/analysis UT for named BLOOMFILTER syntax and semantics.
  • Add FE UT for schema change, table signature, FE->BE materialization, cloud/local create-tablet paths, SHOW PROC, and DESC.
  • Add BE UT for tablet schema FPP resolution, segment writer BF FPP propagation, and variant/extracted-subcolumn BF FPP behavior.
  • Add regression tests for named BF inline DDL, CREATE INDEX / DROP INDEX, named + legacy mixed cases, SHOW INDEX / DESC / SHOW PROC, rollup display cases, and BF FPP behavior / compatibility checks.
  • Add manual validation with the ESRally http_logs dataset:
    • create two Doris tables with the same schema
    • table A uses legacy table properties to define BF columns
    • table B uses named BLOOMFILTER index on the same logical column
    • enable set enable_profile = true and set profile_level = 2
    • run the same point-query SQL on the BF column for both tables
      above can be summarized:
set enable_condition_cache=false;
set enable_profile=true;
set profile_level=2;
select count(*) as c from <table> where clientip = '253.253.253.253';
  • download the generated profiles to ~/ and compare Bloom Filter related profile fields / parameters
  • confirm the relevant Bloom Filter profile information is consistent between the legacy path and the named-index path
NumSegmentTotal: 224 vs 224
RowsBloomFilterFiltered: 727671042 vs 727671042
RowsConditionsFiltered: 727671042 vs 727671042
RowsShortCircuitPredFiltered: 1949545 vs 1949545
ConditionCacheHit: 0 vs 0

Examples

  1. create:
CREATE TABLE test_1 (
      k1 INT,
      v1 STRING,
      INDEX idx_v1_a (v1) USING BLOOMFILTER,
      INDEX idx_v1_b (v1) USING BLOOMFILTER
  ) ENGINE=OLAP
  DUPLICATE KEY(k1)
  DISTRIBUTED BY HASH(k1) BUCKETS 1
  PROPERTIES (
      "replication_num" = "1"
  );

CREATE INDEX idx_k1 ON test_1(k1) USING BLOOMFILTER PROPERTIES("bloom_filter_fpp"="0.03");
  1. drop:
DROP INDEX idx_v1 ON test_1;
ALTER TABLE test_1 DROP COLUMN v1;

Current scope / known limitation

This PR keeps the current non-base materialized-index boundary unchanged.
During schema change / create-partition paths, non-base indexes still do not receive named secondary-index metadata in replica tasks, while FE display shows effective BF columns from the merged legacy + named metadata view. Full alignment of non-base BF materialization and display will be handled in a follow-up Bloom Filter refactor that migrates BF management fully to named BLOOMFILTER indexes and gradually deprecates the legacy bloom_filter_columns path.

Release note

Doris now supports named USING BLOOMFILTER indexes with optional index-level bloom_filter_fpp, while remaining compatible with legacy table-property Bloom Filter columns. Legacy BF columns and named BF indexes cannot be defined on the same column.

Check List (For Author)

  • Test
    • Regression test
    • Unit Test
    • Manual test
  • 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

@hello-stephen

Copy link
Copy Markdown
Contributor

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?

@hoshinojyunn

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 54.44% (21369/39252)
Line Coverage 38.08% (204441/536821)
Region Coverage 34.07% (160362/470727)
Branch Coverage 35.08% (70222/200197)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 0.00% (0/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.07% (28388/38326)
Line Coverage 58.03% (309688/533669)
Region Coverage 54.78% (259025/472870)
Branch Coverage 56.08% (112410/200452)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 62.82% (98/156) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17803	4034	4022	4022
q2	2035	310	190	190
q3	10316	1434	835	835
q4	4680	467	344	344
q5	7482	869	578	578
q6	179	167	136	136
q7	757	856	632	632
q8	9330	1696	1637	1637
q9	5841	4510	4502	4502
q10	6755	1792	1541	1541
q11	443	273	241	241
q12	624	421	299	299
q13	18182	3391	2755	2755
q14	266	261	245	245
q15	q16	792	786	704	704
q17	1019	968	985	968
q18	7275	5826	5653	5653
q19	1320	1252	1045	1045
q20	489	390	263	263
q21	5885	2668	2463	2463
q22	439	364	308	308
Total cold run time: 101912 ms
Total hot run time: 29361 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4314	4239	4223	4223
q2	353	364	232	232
q3	4574	4966	4421	4421
q4	2065	2155	1395	1395
q5	4436	4267	4272	4267
q6	235	177	128	128
q7	1749	1735	1917	1735
q8	2560	2206	2196	2196
q9	8147	8213	7912	7912
q10	4814	4775	4338	4338
q11	577	413	385	385
q12	748	797	539	539
q13	3284	3579	2990	2990
q14	304	308	303	303
q15	q16	739	735	635	635
q17	1321	1342	1428	1342
q18	7758	7463	7229	7229
q19	1144	1081	1104	1081
q20	2234	2190	1936	1936
q21	5215	4607	4479	4479
q22	511	445	390	390
Total cold run time: 57082 ms
Total hot run time: 52156 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 175787 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 5a1b9a52952c829d0d33b45b6c092303a8fa86f3, data reload: false

query5	4337	635	482	482
query6	432	182	167	167
query7	4951	586	306	306
query8	392	209	188	188
query9	8737	4020	4037	4020
query10	432	313	249	249
query11	5908	2338	2148	2148
query12	156	108	100	100
query13	1250	596	445	445
query14	6363	5418	5060	5060
query14_1	4421	4358	4397	4358
query15	209	200	185	185
query16	1058	512	478	478
query17	1143	712	595	595
query18	2559	486	354	354
query19	202	184	147	147
query20	113	116	108	108
query21	218	141	119	119
query22	13676	13544	13449	13449
query23	17332	16526	16154	16154
query23_1	16214	16286	16245	16245
query24	7459	1807	1294	1294
query24_1	1330	1339	1301	1301
query25	557	428	370	370
query26	1297	305	158	158
query27	2616	579	339	339
query28	4365	2027	2009	2009
query29	1041	598	473	473
query30	311	241	197	197
query31	1121	1074	956	956
query32	104	57	55	55
query33	517	320	250	250
query34	1174	1182	652	652
query35	745	782	678	678
query36	1380	1393	1233	1233
query37	150	101	90	90
query38	3184	3164	3062	3062
query39	923	910	896	896
query39_1	885	907	870	870
query40	219	119	100	100
query41	65	61	61	61
query42	96	95	96	95
query43	320	322	280	280
query44	1440	766	757	757
query45	198	191	182	182
query46	1065	1248	770	770
query47	2349	2380	2232	2232
query48	415	378	293	293
query49	622	456	344	344
query50	972	377	260	260
query51	4425	4340	4267	4267
query52	88	89	76	76
query53	242	268	200	200
query54	265	226	191	191
query55	76	74	70	70
query56	234	217	206	206
query57	1418	1431	1319	1319
query58	254	210	213	210
query59	1573	1654	1389	1389
query60	279	252	237	237
query61	216	142	147	142
query62	688	659	561	561
query63	232	187	190	187
query64	2502	759	596	596
query65	4872	4798	4775	4775
query66	1754	448	335	335
query67	29724	29767	29460	29460
query68	3216	1585	1016	1016
query69	411	295	265	265
query70	1058	968	955	955
query71	282	232	216	216
query72	2824	2617	2283	2283
query73	789	766	426	426
query74	5126	4977	4776	4776
query75	2618	2605	2237	2237
query76	2342	1179	805	805
query77	357	372	296	296
query78	12373	12489	11975	11975
query79	1427	1209	782	782
query80	609	523	413	413
query81	457	281	246	246
query82	594	156	126	126
query83	365	292	256	256
query84	266	153	126	126
query85	941	575	481	481
query86	360	302	291	291
query87	3395	3343	3196	3196
query88	3706	2775	2760	2760
query89	417	380	335	335
query90	1996	176	181	176
query91	171	156	128	128
query92	60	61	55	55
query93	1448	1510	919	919
query94	545	335	324	324
query95	673	463	335	335
query96	1034	794	331	331
query97	2721	2689	2564	2564
query98	214	206	194	194
query99	1148	1147	1024	1024
Total cold run time: 259886 ms
Total hot run time: 175787 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.23 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 5a1b9a52952c829d0d33b45b6c092303a8fa86f3, data reload: false

query1	0.01	0.01	0.00
query2	0.09	0.05	0.05
query3	0.26	0.14	0.12
query4	1.61	0.14	0.14
query5	0.24	0.23	0.22
query6	1.22	1.08	1.08
query7	0.04	0.01	0.01
query8	0.06	0.04	0.04
query9	0.37	0.34	0.31
query10	0.57	0.54	0.54
query11	0.20	0.15	0.15
query12	0.19	0.15	0.14
query13	0.48	0.46	0.48
query14	1.02	1.01	1.01
query15	0.60	0.59	0.60
query16	0.32	0.32	0.32
query17	1.11	1.08	1.06
query18	0.21	0.21	0.22
query19	2.03	2.00	1.95
query20	0.02	0.01	0.02
query21	15.44	0.23	0.14
query22	4.74	0.06	0.05
query23	16.13	0.32	0.13
query24	2.97	0.42	0.33
query25	0.11	0.04	0.05
query26	0.71	0.22	0.15
query27	0.03	0.05	0.03
query28	3.53	0.94	0.53
query29	12.52	4.33	3.47
query30	0.28	0.15	0.16
query31	2.77	0.60	0.31
query32	3.22	0.60	0.49
query33	3.24	3.23	3.22
query34	15.54	4.25	3.49
query35	3.51	3.50	3.54
query36	0.56	0.43	0.43
query37	0.09	0.07	0.06
query38	0.04	0.04	0.03
query39	0.04	0.02	0.02
query40	0.18	0.16	0.16
query41	0.08	0.03	0.02
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 96.46 s
Total hot run time: 25.23 s

@hoshinojyunn
hoshinojyunn force-pushed the master branch 2 times, most recently from 39129a2 to 0e0cf67 Compare June 21, 2026 06:44
@hoshinojyunn

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 54.46% (21378/39252)
Line Coverage 38.07% (204375/536821)
Region Coverage 34.06% (160313/470727)
Branch Coverage 35.09% (70243/200197)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 74.36% (116/156) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.12% (28409/38326)
Line Coverage 58.05% (309814/533669)
Region Coverage 54.96% (259904/472870)
Branch Coverage 56.23% (112705/200452)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 76.28% (119/156) 🎉
Increment coverage report
Complete coverage report

@hoshinojyunn
hoshinojyunn force-pushed the master branch 2 times, most recently from 80d0150 to 1be7525 Compare June 21, 2026 11:01
@hoshinojyunn

Copy link
Copy Markdown
Contributor Author

run buildall

@yx-keith

Copy link
Copy Markdown
Contributor

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I found three issues that should be fixed before merging.

Checkpoint conclusions:

  • Task goal and implementation: the named BLOOMFILTER syntax is wired through parser/catalog/schema-change paths, but materialization is incomplete for non-base materialized indexes.
  • Tests: good coverage for parser, FE validation, BE tablet metadata, and regression DDL; missing rollup/schema-change materialization and backup/restore signature coverage for named-only bloom filters.
  • Compatibility and persistence: named-only bloom_filter_fpp is not reflected in the table signature used by restore schema comparison.
  • Parallel paths: local/cloud schema-change and create-table/add-partition paths need the same effective bloom-filter-column handling.
  • Performance/concurrency/lifecycle: no separate blocking issue found in locking, lifecycle, or performance-sensitive code.
  • User focus: no additional user-provided focus points were present.

tColumns = (List<TColumn>) tCols;
} else {
tColumns = new ArrayList<>();
Set<String> namedBfColumns = Index.extractBloomFilterColumns(indexes);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Named bloom filter columns are derived only from indexes, but several existing non-base-index callers still pass null here. For example, SchemaChangeJobV2.createShadowIndexReplica() only passes indexes for the base index, while addShadowIndexToCatalog() writes the new index list into every changed shadow index meta when indexChange is true. ALTER TABLE ... ADD INDEX bf(v1) USING BLOOMFILTER on a table with a rollup containing v1 will therefore create the rollup shadow tablets without is_bloom_filter_column or bloom_filter_fpp, but the catalog then advertises the bloom filter index for that rollup. The same base-only indexes pattern exists in the cloud schema-change path and initial partition creation. Please pass the effective named bloom-filter column set to every materialized index schema that contains those columns, or fold named bloom-filter columns into the bfColumns argument, and add a rollup/schema-change test.

@hoshinojyunn hoshinojyunn Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There is a real mismatch here, but I am treating it as an existing semantic boundary rather than something this PR should partially fix.

Current behavior is:

  • non-base materialized indexes (for example rollup/MV shadow replicas, and the corresponding create-table / add-partition non-base paths) still do not receive named secondary-index metadata in replica/create-tablet tasks;
  • legacy BF columns are still propagated through bfColumns from table properties;
  • FE display/meta now shows the effective BF columns from both legacy table properties and named BLOOMFILTER indexes.

So today named BF on non-base indexes is indeed not fully aligned between physical materialization and FE display. I do not want to "fix" this in this PR by only passing named BF indexes into rollup schema-change replica tasks, because that would make rollup behavior differ before vs after schema change and would deepen the split between the legacy bloom_filter_columns path and the named-index path.

The planned direction is to refactor bloom filter metadata as a whole, gradually deprecate/remove the legacy table-property mechanism for BF columns, and then move BF fully onto named BLOOMFILTER indexes. Once that migration is ready, non-base materialization and display semantics can be unified cleanly.

So for this PR I am keeping the scope to:

  • named BLOOMFILTER DDL support
  • index-level bloom_filter_fpp
  • FE/BE materialization for the currently supported paths
  • compatibility with legacy bloom_filter_columns
  • FE/BE UT and regression coverage in that scope

I will note this limitation explicitly in the PR description.

Comment thread fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java Outdated
@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 75.64% (118/156) 🎉
Increment coverage report
Complete coverage report

Comment thread fe/fe-core/src/main/java/org/apache/doris/task/CreateReplicaTask.java Outdated
@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 38.03% (81/213) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 44.72% (127/284) 🎉
Increment coverage report
Complete coverage report

@hoshinojyunn

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17701	4060	4036	4036
q2	2009	340	198	198
q3	10311	1481	852	852
q4	4694	480	349	349
q5	7521	855	580	580
q6	183	171	135	135
q7	783	836	633	633
q8	9352	1755	1778	1755
q9	5742	4513	4459	4459
q10	6757	1786	1538	1538
q11	505	349	317	317
q12	720	558	443	443
q13	18091	3393	2802	2802
q14	259	271	242	242
q15	q16	794	776	731	731
q17	1057	1096	927	927
q18	7072	5872	5598	5598
q19	1233	1229	1145	1145
q20	779	662	537	537
q21	6392	2865	2690	2690
q22	478	378	321	321
Total cold run time: 102433 ms
Total hot run time: 30288 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5131	4799	4795	4795
q2	297	329	221	221
q3	4931	5309	4690	4690
q4	2089	2165	1369	1369
q5	4972	4731	4654	4654
q6	239	178	133	133
q7	1932	1731	1534	1534
q8	2409	2149	2126	2126
q9	7705	7191	7219	7191
q10	4694	4627	4237	4237
q11	520	386	348	348
q12	734	736	524	524
q13	2961	3468	2756	2756
q14	279	280	263	263
q15	q16	679	689	615	615
q17	1302	1265	1256	1256
q18	7482	6862	6876	6862
q19	1145	1116	1133	1116
q20	2230	2207	1941	1941
q21	5250	4515	4421	4421
q22	533	456	395	395
Total cold run time: 57514 ms
Total hot run time: 51447 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 173769 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 355e278cbc991f91cd1351b0480ea6c130ad94b2, data reload: false

query5	4334	653	490	490
query6	472	220	214	214
query7	4885	601	338	338
query8	343	194	177	177
query9	8772	4041	4056	4041
query10	487	354	319	319
query11	5918	2306	2117	2117
query12	156	97	98	97
query13	1257	597	429	429
query14	6226	5294	4977	4977
query14_1	4267	4291	4277	4277
query15	209	196	181	181
query16	993	460	445	445
query17	925	714	565	565
query18	2435	473	341	341
query19	206	186	142	142
query20	108	117	113	113
query21	241	151	129	129
query22	13510	13703	13406	13406
query23	17391	16524	16134	16134
query23_1	16257	16119	16144	16119
query24	7511	1772	1333	1333
query24_1	1348	1306	1274	1274
query25	571	460	394	394
query26	1335	360	210	210
query27	2625	595	386	386
query28	4505	2070	2020	2020
query29	1085	648	517	517
query30	350	260	226	226
query31	1114	1096	972	972
query32	106	63	62	62
query33	519	322	261	261
query34	1177	1159	636	636
query35	766	777	683	683
query36	1407	1411	1223	1223
query37	153	107	100	100
query38	1849	1703	1654	1654
query39	930	908	891	891
query39_1	893	879	890	879
query40	254	165	147	147
query41	71	69	72	69
query42	98	138	96	96
query43	324	323	287	287
query44	1434	777	793	777
query45	200	189	180	180
query46	1028	1205	752	752
query47	2334	2387	2261	2261
query48	393	426	296	296
query49	582	423	314	314
query50	1059	429	329	329
query51	4464	4454	4433	4433
query52	85	86	76	76
query53	265	292	205	205
query54	276	229	213	213
query55	78	74	68	68
query56	288	300	304	300
query57	1443	1390	1358	1358
query58	292	283	269	269
query59	1542	1633	1388	1388
query60	307	266	256	256
query61	155	157	155	155
query62	701	652	588	588
query63	250	203	203	203
query64	2490	766	591	591
query65	4898	4817	4766	4766
query66	1804	509	394	394
query67	29751	29692	29468	29468
query68	3158	1496	933	933
query69	410	303	275	275
query70	1062	1026	975	975
query71	350	320	298	298
query72	2950	2768	2523	2523
query73	856	742	456	456
query74	5107	4954	4774	4774
query75	2617	2590	2215	2215
query76	2308	1179	774	774
query77	351	387	275	275
query78	12345	12375	11995	11995
query79	1388	1128	760	760
query80	683	545	448	448
query81	453	327	281	281
query82	562	157	120	120
query83	406	325	290	290
query84	323	159	132	132
query85	924	603	516	516
query86	358	294	275	275
query87	1841	1823	1749	1749
query88	3716	2814	2799	2799
query89	456	399	361	361
query90	1884	201	197	197
query91	199	197	158	158
query92	65	58	55	55
query93	1617	1560	972	972
query94	564	361	305	305
query95	788	497	564	497
query96	1126	810	359	359
query97	2659	2700	2586	2586
query98	220	207	204	204
query99	1190	1170	1029	1029
Total cold run time: 257773 ms
Total hot run time: 173769 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.13 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 355e278cbc991f91cd1351b0480ea6c130ad94b2, data reload: false

query1	0.01	0.01	0.01
query2	0.10	0.05	0.06
query3	0.25	0.13	0.13
query4	1.61	0.14	0.14
query5	0.26	0.22	0.21
query6	1.24	1.02	1.09
query7	0.03	0.00	0.00
query8	0.05	0.04	0.04
query9	0.37	0.31	0.32
query10	0.57	0.56	0.53
query11	0.20	0.14	0.15
query12	0.17	0.14	0.15
query13	0.47	0.47	0.47
query14	1.01	1.02	1.01
query15	0.62	0.59	0.60
query16	0.31	0.31	0.32
query17	1.11	1.10	1.09
query18	0.22	0.21	0.22
query19	2.00	1.94	1.92
query20	0.02	0.01	0.01
query21	15.47	0.21	0.14
query22	4.81	0.05	0.06
query23	16.13	0.30	0.12
query24	3.04	0.43	0.32
query25	0.11	0.05	0.05
query26	0.83	0.20	0.14
query27	0.04	0.05	0.03
query28	3.64	0.95	0.55
query29	12.50	4.39	3.42
query30	0.27	0.16	0.15
query31	2.77	0.61	0.32
query32	3.23	0.60	0.48
query33	3.28	3.29	3.20
query34	15.56	4.24	3.51
query35	3.52	3.57	3.55
query36	0.55	0.44	0.41
query37	0.08	0.06	0.07
query38	0.05	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.16	0.15
query41	0.09	0.03	0.03
query42	0.04	0.02	0.02
query43	0.04	0.03	0.04
Total cold run time: 96.89 s
Total hot run time: 25.13 s

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 81.82% (126/154) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 66.67% (126/189) 🎉
Increment coverage report
Complete coverage report

@hoshinojyunn

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 92.86% (26/28) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 56.34% (22995/40814)
Line Coverage 40.03% (223734/558960)
Region Coverage 36.02% (176896/491100)
Branch Coverage 37.12% (78723/212095)

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17718	4212	4108	4108
q2	2028	333	203	203
q3	10311	1436	849	849
q4	4708	469	341	341
q5	7645	872	581	581
q6	223	182	143	143
q7	808	869	628	628
q8	10443	1570	1618	1570
q9	6210	4438	4425	4425
q10	6798	1805	1526	1526
q11	508	353	329	329
q12	724	556	441	441
q13	18212	3452	2804	2804
q14	267	271	249	249
q15	q16	786	775	703	703
q17	1040	1043	1061	1043
q18	6910	5874	5527	5527
q19	1177	1234	1066	1066
q20	795	656	569	569
q21	5597	2706	2579	2579
q22	433	370	305	305
Total cold run time: 103341 ms
Total hot run time: 29989 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4483	4347	4402	4347
q2	310	321	216	216
q3	4623	4973	4402	4402
q4	2151	2172	1386	1386
q5	4492	4384	4425	4384
q6	244	254	216	216
q7	2036	1871	1605	1605
q8	2634	2235	2305	2235
q9	7947	7868	7928	7868
q10	4696	4714	4246	4246
q11	724	422	422	422
q12	756	745	548	548
q13	3311	3626	2973	2973
q14	295	325	311	311
q15	q16	741	739	665	665
q17	1392	1369	1353	1353
q18	8204	7334	7049	7049
q19	1175	1123	1093	1093
q20	2220	2223	1952	1952
q21	5382	4725	4632	4632
q22	550	467	411	411
Total cold run time: 58366 ms
Total hot run time: 52314 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 173930 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 3f1515c469f66aa1b5e832f8b2faad91de0850f9, data reload: false

query5	4304	629	504	504
query6	469	218	204	204
query7	4948	612	352	352
query8	329	192	174	174
query9	8759	4085	4091	4085
query10	461	351	304	304
query11	5889	2319	2135	2135
query12	155	103	101	101
query13	1281	626	446	446
query14	6254	5327	5044	5044
query14_1	4397	4339	4414	4339
query15	225	206	181	181
query16	1026	491	452	452
query17	1139	757	599	599
query18	2461	486	349	349
query19	215	200	160	160
query20	113	109	111	109
query21	240	157	136	136
query22	13647	13767	13410	13410
query23	17366	16506	16122	16122
query23_1	16269	16355	16411	16355
query24	7628	1776	1323	1323
query24_1	1300	1330	1322	1322
query25	566	471	398	398
query26	1325	351	215	215
query27	2593	633	379	379
query28	4445	2025	2011	2011
query29	1087	630	507	507
query30	344	266	234	234
query31	1121	1096	1002	1002
query32	109	110	59	59
query33	535	311	253	253
query34	1172	1142	653	653
query35	762	789	671	671
query36	1378	1415	1228	1228
query37	157	112	100	100
query38	1867	1686	1630	1630
query39	926	930	901	901
query39_1	871	879	880	879
query40	244	159	138	138
query41	66	65	62	62
query42	92	93	98	93
query43	331	339	292	292
query44	1434	787	763	763
query45	203	198	183	183
query46	1073	1240	769	769
query47	2329	2285	2281	2281
query48	399	449	318	318
query49	584	452	315	315
query50	1118	434	345	345
query51	4477	4342	4391	4342
query52	84	86	77	77
query53	261	275	199	199
query54	291	241	223	223
query55	76	74	67	67
query56	297	294	267	267
query57	1425	1413	1315	1315
query58	283	248	269	248
query59	1639	1731	1505	1505
query60	294	266	253	253
query61	153	149	149	149
query62	696	652	583	583
query63	249	201	229	201
query64	2538	760	601	601
query65	4914	4821	4783	4783
query66	1816	505	384	384
query67	29445	29485	29329	29329
query68	3218	1629	987	987
query69	410	312	278	278
query70	1069	960	989	960
query71	353	343	304	304
query72	2883	2639	2355	2355
query73	802	755	423	423
query74	5102	4980	4766	4766
query75	2608	2583	2228	2228
query76	2314	1180	813	813
query77	350	382	280	280
query78	12367	12487	11863	11863
query79	1367	1164	736	736
query80	1267	542	478	478
query81	544	327	290	290
query82	637	157	124	124
query83	369	315	290	290
query84	278	164	134	134
query85	972	607	528	528
query86	419	298	250	250
query87	1841	1832	1767	1767
query88	3767	2836	2799	2799
query89	456	409	356	356
query90	1889	210	202	202
query91	215	195	165	165
query92	66	59	58	58
query93	1721	1475	970	970
query94	715	352	304	304
query95	787	497	583	497
query96	1011	774	381	381
query97	2676	2722	2533	2533
query98	222	203	208	203
query99	1178	1148	997	997
Total cold run time: 259083 ms
Total hot run time: 173930 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.35 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 3f1515c469f66aa1b5e832f8b2faad91de0850f9, data reload: false

query1	0.01	0.00	0.01
query2	0.10	0.05	0.05
query3	0.28	0.14	0.14
query4	1.61	0.14	0.14
query5	0.25	0.24	0.23
query6	1.23	1.11	1.10
query7	0.04	0.01	0.01
query8	0.06	0.03	0.04
query9	0.38	0.32	0.33
query10	0.58	0.59	0.55
query11	0.19	0.14	0.14
query12	0.18	0.15	0.15
query13	0.48	0.47	0.48
query14	1.02	1.00	1.00
query15	0.60	0.59	0.59
query16	0.32	0.34	0.33
query17	1.14	1.16	1.13
query18	0.24	0.22	0.21
query19	2.09	1.95	2.04
query20	0.01	0.02	0.01
query21	15.43	0.23	0.14
query22	4.78	0.05	0.06
query23	16.08	0.32	0.12
query24	2.95	0.42	0.33
query25	0.11	0.05	0.05
query26	0.74	0.21	0.15
query27	0.05	0.04	0.03
query28	3.52	0.91	0.52
query29	12.48	4.33	3.50
query30	0.26	0.16	0.15
query31	2.78	0.61	0.32
query32	3.22	0.61	0.49
query33	3.24	3.16	3.18
query34	15.66	4.28	3.48
query35	3.56	3.55	3.51
query36	0.57	0.43	0.43
query37	0.08	0.06	0.07
query38	0.05	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.17	0.15
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.05	0.04	0.03
Total cold run time: 96.77 s
Total hot run time: 25.35 s

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 68.18% (105/154) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 92.86% (26/28) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.67% (29746/39839)
Line Coverage 58.70% (326219/555729)
Region Coverage 55.63% (274346/493167)
Branch Coverage 56.80% (120609/212332)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 81.82% (126/154) 🎉
Increment coverage report
Complete coverage report

@airborne12

Copy link
Copy Markdown
Member

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Found four correctness issues in the named BLOOMFILTER implementation: invalid index-level FPP errors are silently converted, local create-replica column caching can reuse named-BF flags from the wrong context, root VARIANT named BLOOMFILTER is accepted but physically suppressed before writer creation, and mixed light-index ALTER can publish BLOOMFILTER metadata without full tablet-schema materialization.

Validation was static only: this checkout is missing .worktree_initialized, thirdparty/installed, and thirdparty/installed/bin/protoc, and the review prompt forbids source edits/builds. Also, Round 3 produced the last two accepted findings at the configured three-round cap, so convergence could not be rerun after the final comment-set update.

Comment thread be/src/storage/tablet/tablet_schema.cpp Outdated
Assumption / semantic boundary:
A named bloom filter index and a property-managed bloom filter index cannot be
defined on the same column. The two metadata forms are managed separately, and
users must use `DROP INDEX` for named bloom filter indexes and
`ALTER TABLE SET("bloom_filter_columns" = ...)` for property-managed bloom
filter indexes.

Problem Summary:
Previously Doris only supported bloom filter indexes through table properties such as
`"bloom_filter_columns"` and `"bloom_filter_fpp"`. That made bloom filter indexes
behave differently from other index types and prevented users from managing them with
named `INDEX` / `CREATE INDEX` / `DROP INDEX` syntax.

This change adds named `USING BLOOMFILTER` syntax in the Nereids parser and FE DDL
pipeline, keeps the existing table-property bloom filter behavior for legacy metadata,
and enforces that legacy bloom filter columns and named bloom filter indexes cannot be
defined on the same column. The schema change path now distinguishes legacy bloom
filter management from named bloom filter management. Named BF indexes using index-level
`bloom_filter_fpp` properties while legacy bloom filter columns use table-level
`bloom_filter_fpp` properties.

The patch also fixes bloom filter materialization on shadow columns and ensures tablet
metadata marks named bloom filter columns correctly on the BE side. FE unit tests and
bloom filter regression tests are added to cover parser analysis, semantic validation,
schema change checks, FE->BE task generation, and named bloom filter DDL behavior.
@hoshinojyunn

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 68.18% (105/154) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17619	4157	4130	4130
q2	2020	336	214	214
q3	10339	1508	867	867
q4	4682	475	341	341
q5	7606	850	574	574
q6	192	171	137	137
q7	774	831	609	609
q8	9365	1622	1583	1583
q9	5649	4428	4388	4388
q10	6751	1760	1507	1507
q11	511	375	331	331
q12	743	569	457	457
q13	18090	3485	2816	2816
q14	263	272	250	250
q15	q16	788	783	713	713
q17	1000	964	972	964
q18	7115	5670	5512	5512
q19	1180	1335	1099	1099
q20	795	703	580	580
q21	5596	2742	2313	2313
q22	423	369	298	298
Total cold run time: 101501 ms
Total hot run time: 29683 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4427	4317	4319	4317
q2	294	325	213	213
q3	4585	5011	4441	4441
q4	2071	2141	1356	1356
q5	4401	4334	4355	4334
q6	237	176	131	131
q7	1742	2156	1803	1803
q8	2597	2205	2201	2201
q9	8013	8080	7742	7742
q10	4728	4666	4275	4275
q11	591	442	384	384
q12	769	780	543	543
q13	3321	3630	2911	2911
q14	289	302	290	290
q15	q16	727	727	635	635
q17	1347	1319	1343	1319
q18	8096	7378	7302	7302
q19	1197	1136	1136	1136
q20	2241	2257	1975	1975
q21	5274	4552	4393	4393
q22	514	462	403	403
Total cold run time: 57461 ms
Total hot run time: 52104 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 178326 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 047a93300b1aa875d2ef9df54dd603ccb94ee1c4, data reload: false

query5	4310	627	509	509
query6	467	239	206	206
query7	4850	621	347	347
query8	335	189	165	165
query9	8744	4162	4114	4114
query10	509	371	301	301
query11	5856	2353	2158	2158
query12	166	105	103	103
query13	1316	607	452	452
query14	6243	5273	4890	4890
query14_1	4257	4259	4206	4206
query15	213	203	183	183
query16	988	453	461	453
query17	983	692	552	552
query18	2439	452	336	336
query19	212	181	142	142
query20	104	106	107	106
query21	231	166	129	129
query22	13661	13565	13443	13443
query23	17542	16530	16147	16147
query23_1	16198	16317	16269	16269
query24	7617	1773	1277	1277
query24_1	1318	1265	1276	1265
query25	539	435	370	370
query26	1354	347	213	213
query27	2634	583	388	388
query28	4496	1972	1981	1972
query29	1059	631	480	480
query30	344	266	226	226
query31	1110	1092	969	969
query32	104	63	61	61
query33	512	304	245	245
query34	1201	1146	633	633
query35	767	771	653	653
query36	1191	1208	1073	1073
query37	149	118	93	93
query38	1881	1706	1650	1650
query39	901	886	865	865
query39_1	831	837	843	837
query40	247	167	149	149
query41	71	69	72	69
query42	92	94	95	94
query43	330	326	287	287
query44	1403	797	764	764
query45	203	187	182	182
query46	1059	1192	727	727
query47	2136	2115	1991	1991
query48	404	427	297	297
query49	596	420	320	320
query50	1047	435	333	333
query51	10843	10614	10701	10614
query52	89	87	87	87
query53	260	274	205	205
query54	331	228	209	209
query55	74	76	66	66
query56	316	292	294	292
query57	1334	1296	1204	1204
query58	294	257	253	253
query59	1629	1684	1469	1469
query60	304	271	252	252
query61	150	148	151	148
query62	548	499	435	435
query63	238	206	203	203
query64	2809	1029	853	853
query65	4717	4653	4631	4631
query66	1808	488	385	385
query67	29403	29273	29144	29144
query68	3180	1535	902	902
query69	403	305	266	266
query70	1059	951	942	942
query71	370	336	308	308
query72	3102	2876	2567	2567
query73	799	773	450	450
query74	5094	4936	4758	4758
query75	2547	2506	2138	2138
query76	2343	1176	775	775
query77	364	378	282	282
query78	11969	11867	11479	11479
query79	1402	1153	765	765
query80	1045	557	458	458
query81	504	329	279	279
query82	562	160	121	121
query83	397	320	299	299
query84	327	161	129	129
query85	983	618	515	515
query86	406	287	264	264
query87	1831	1819	1758	1758
query88	3735	2784	2776	2776
query89	428	373	340	340
query90	1803	203	206	203
query91	204	198	163	163
query92	62	57	55	55
query93	1588	1539	988	988
query94	611	353	306	306
query95	800	643	486	486
query96	1081	772	339	339
query97	2621	2610	2506	2506
query98	218	203	203	203
query99	1098	1111	976	976
Total cold run time: 263768 ms
Total hot run time: 178326 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.17 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 047a93300b1aa875d2ef9df54dd603ccb94ee1c4, data reload: false

query1	0.00	0.00	0.00
query2	0.10	0.05	0.08
query3	0.25	0.14	0.14
query4	1.60	0.14	0.14
query5	0.25	0.23	0.22
query6	1.24	1.02	1.06
query7	0.04	0.00	0.01
query8	0.06	0.04	0.04
query9	0.38	0.31	0.33
query10	0.58	0.59	0.55
query11	0.20	0.13	0.14
query12	0.18	0.14	0.14
query13	0.47	0.46	0.47
query14	1.04	1.00	1.02
query15	0.62	0.60	0.61
query16	0.30	0.34	0.32
query17	1.15	1.16	1.12
query18	0.22	0.22	0.22
query19	2.09	1.98	1.88
query20	0.01	0.02	0.01
query21	15.45	0.22	0.13
query22	4.76	0.05	0.06
query23	16.14	0.31	0.12
query24	2.94	0.42	0.32
query25	0.11	0.05	0.05
query26	0.75	0.20	0.16
query27	0.04	0.04	0.04
query28	3.54	0.93	0.56
query29	12.51	4.19	3.35
query30	0.29	0.15	0.17
query31	2.78	0.58	0.32
query32	3.21	0.60	0.49
query33	3.17	3.32	3.20
query34	15.48	4.28	3.54
query35	3.56	3.54	3.56
query36	0.55	0.44	0.41
query37	0.09	0.07	0.07
query38	0.05	0.04	0.04
query39	0.03	0.03	0.04
query40	0.18	0.16	0.16
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.03	0.04
Total cold run time: 96.57 s
Total hot run time: 25.17 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 96.30% (26/27) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.03% (30500/40652)
Line Coverage 59.16% (336179/568207)
Region Coverage 55.90% (282074/504603)
Branch Coverage 57.19% (125128/218788)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants