Skip to content

[fix](iceberg) fix doris can't select from iceberg on bos (#65170)#65171

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

[fix](iceberg) fix doris can't select from iceberg on bos (#65170)#65171
WeiPrince wants to merge 1 commit into
apache:masterfrom
WeiPrince:master

Conversation

@WeiPrince

@WeiPrince WeiPrince commented Jul 2, 2026

Copy link
Copy Markdown

What problem does this PR solve?

Issue Number: close #65170

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.
      • [✅] I think you don't have BOS to test, I have tested it and merge it to PALO
  • 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?

@yiguolei

yiguolei commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

/review

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@yiguolei

yiguolei commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

run buildall

@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.

Automated review conclusion: request changes.

Critical checkpoint conclusions:

  • Goal and tests: the PR maps bos:// to S3/FILE_S3 so the normal Iceberg file path can be scanned through the existing S3-compatible handling. The same end-to-end BOS Iceberg catalog workflow is not covered by a focused test.
  • Scope: the code change is small and clear, but it misses a parallel catalog-creation connectivity path.
  • Concurrency and lifecycle: no new concurrency, locks, lifecycle ownership, or static initialization risk found in the changed code.
  • Configuration and compatibility: no new config is added. Existing test_connection=true behavior remains incompatible with bos:// Iceberg warehouses, which is the blocking finding.
  • Parallel paths: normal LocationPath scan/sink routing and S3-compatible normalization were checked; catalog connectivity validation still uses separate scheme checks.
  • Testing: existing generic mapper and S3 normalization tests partially cover the mapping/normalization helpers, but there is no bos:// Iceberg warehouse test_connection=true coverage.
  • Persistence, transactions, writes, observability, and performance: not applicable or no additional concern found for this one-line mapper change.

Subagent conclusions:

  • optimizer-rewrite: no optimizer/rewrite, join, aggregate, or Nereids semantic-equivalence finding.
  • tests-session-config: TEST-1 was accepted as MAIN-1 and submitted as the inline comment.
  • Convergence round 1 ended with both live subagents reporting NO_NEW_VALUABLE_FINDINGS for the final ledger/comment set.

User focus: no additional user-provided focus points were supplied.

Validation notes: static review only in this runner. .worktree_initialized, thirdparty/installed, and thirdparty/installed/bin/protoc are missing, so I did not run FE build/unit tests locally. I verified the live PR head remains 524196b0bfa15b4e4c489fd2303b9d2f74bf3731, the GitHub PR file list still contains only SchemaTypeMapper.java, and there were no existing inline review comments to deduplicate against.

HTTP("http", StorageProperties.Type.HTTP, FileSystemType.HTTP, TFileType.FILE_HTTP),
HTTPS("https", StorageProperties.Type.HTTP, FileSystemType.HTTP, TFileType.FILE_HTTP);
HTTPS("https", StorageProperties.Type.HTTP, FileSystemType.HTTP, TFileType.FILE_HTTP),
BOS("bos", StorageProperties.Type.S3, FileSystemType.S3, TFileType.FILE_S3);

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.

This makes the normal LocationPath/Iceberg scan path treat bos:// as S3, but the test_connection=true catalog-creation path still has its own scheme checks. ExternalCatalog.checkWhenCreating() runs CatalogConnectivityTestCoordinator; for Iceberg Glue, getTestLocation() rejects any warehouse that does not match ^(s3|s3a|s3n)://, so a bos://... Glue warehouse still fails before users reach the fixed scan path. For HMS/REST, the base tester can return the configured bos:// warehouse, but findMatchingObjectStorage() only matches s3:///s3a://, so the S3-compatible BOS storage test is skipped. Please route this path through the same SchemaTypeMapper/LocationPath normalization or add bos to the connectivity validation/matching logic, and cover a bos:// Iceberg warehouse with test_connection=true.

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17721	4063	4042	4042
q2	2015	324	201	201
q3	10304	1401	817	817
q4	4678	473	345	345
q5	7509	855	577	577
q6	181	172	133	133
q7	782	834	652	652
q8	9340	1762	1665	1665
q9	5618	4382	4382	4382
q10	6771	1798	1544	1544
q11	504	328	305	305
q12	694	556	440	440
q13	18075	3386	2791	2791
q14	265	271	245	245
q15	q16	789	778	704	704
q17	1035	1049	946	946
q18	6784	5733	5668	5668
q19	1309	1233	1040	1040
q20	724	643	530	530
q21	5852	2618	2431	2431
q22	445	360	307	307
Total cold run time: 101395 ms
Total hot run time: 29765 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4368	4245	4286	4245
q2	288	315	219	219
q3	4569	4917	4397	4397
q4	2032	2149	1376	1376
q5	4409	4309	4310	4309
q6	230	173	131	131
q7	1730	1759	1910	1759
q8	2531	2224	2190	2190
q9	7999	8211	7750	7750
q10	4756	4676	4234	4234
q11	548	423	387	387
q12	765	763	570	570
q13	3294	3628	2931	2931
q14	288	315	264	264
q15	q16	721	736	631	631
q17	1352	1321	1329	1321
q18	7913	7258	7303	7258
q19	1154	1124	1076	1076
q20	2191	2201	1942	1942
q21	5232	4557	4400	4400
q22	513	471	416	416
Total cold run time: 56883 ms
Total hot run time: 51806 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 179902 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 524196b0bfa15b4e4c489fd2303b9d2f74bf3731, data reload: false

query5	4328	624	492	492
query6	455	224	208	208
query7	4880	551	339	339
query8	336	192	171	171
query9	8734	3996	3981	3981
query10	444	346	297	297
query11	5886	2360	2187	2187
query12	155	106	103	103
query13	1260	599	440	440
query14	6272	5280	4984	4984
query14_1	4324	4262	4288	4262
query15	213	203	177	177
query16	987	489	439	439
query17	929	709	552	552
query18	2423	462	336	336
query19	201	187	139	139
query20	106	113	107	107
query21	234	152	126	126
query22	13569	13544	13578	13544
query23	17218	16638	16205	16205
query23_1	16233	16346	16272	16272
query24	7476	1764	1291	1291
query24_1	1291	1308	1308	1308
query25	547	421	358	358
query26	1317	363	212	212
query27	2604	561	378	378
query28	4430	2050	2005	2005
query29	1097	625	515	515
query30	347	257	230	230
query31	1120	1093	993	993
query32	102	63	65	63
query33	532	339	263	263
query34	1197	1183	659	659
query35	782	777	677	677
query36	1405	1389	1225	1225
query37	173	121	93	93
query38	1867	1708	1655	1655
query39	926	915	887	887
query39_1	873	879	877	877
query40	255	161	141	141
query41	70	71	69	69
query42	94	92	92	92
query43	325	319	281	281
query44	1424	791	786	786
query45	200	196	183	183
query46	1100	1181	750	750
query47	2364	2353	2193	2193
query48	418	408	318	318
query49	588	427	319	319
query50	1106	445	339	339
query51	10869	10779	10420	10420
query52	96	87	77	77
query53	277	291	208	208
query54	297	244	230	230
query55	76	72	67	67
query56	315	316	309	309
query57	1427	1414	1293	1293
query58	295	257	265	257
query59	1641	1678	1395	1395
query60	323	282	277	277
query61	174	174	175	174
query62	701	656	589	589
query63	258	208	206	206
query64	2641	793	596	596
query65	4883	4813	4746	4746
query66	1815	509	388	388
query67	29745	29504	29358	29358
query68	3286	1543	1030	1030
query69	403	312	272	272
query70	1063	1034	952	952
query71	351	345	325	325
query72	2939	2612	2423	2423
query73	859	810	467	467
query74	5088	4958	4744	4744
query75	2617	2545	2210	2210
query76	2331	1180	800	800
query77	361	380	293	293
query78	12275	12459	11845	11845
query79	1413	1172	775	775
query80	1302	544	471	471
query81	524	329	274	274
query82	619	158	122	122
query83	414	315	290	290
query84	331	157	128	128
query85	942	589	507	507
query86	421	309	284	284
query87	1825	1828	1763	1763
query88	3721	2801	2768	2768
query89	451	413	369	369
query90	1920	205	185	185
query91	209	188	156	156
query92	64	60	56	56
query93	1590	1549	950	950
query94	723	354	341	341
query95	781	481	473	473
query96	1080	824	341	341
query97	2709	2688	2573	2573
query98	214	206	198	198
query99	1170	1170	1023	1023
Total cold run time: 265451 ms
Total hot run time: 179902 ms

@hello-stephen

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

query1	0.01	0.01	0.00
query2	0.09	0.05	0.05
query3	0.24	0.13	0.13
query4	1.61	0.15	0.14
query5	0.24	0.23	0.24
query6	1.23	1.08	1.06
query7	0.04	0.01	0.01
query8	0.05	0.04	0.04
query9	0.38	0.30	0.30
query10	0.56	0.54	0.55
query11	0.19	0.14	0.14
query12	0.18	0.14	0.15
query13	0.48	0.47	0.47
query14	1.04	1.03	1.00
query15	0.62	0.60	0.59
query16	0.31	0.32	0.31
query17	1.09	1.15	1.09
query18	0.24	0.21	0.21
query19	2.01	2.01	1.96
query20	0.02	0.01	0.01
query21	15.43	0.22	0.14
query22	4.85	0.06	0.06
query23	16.13	0.32	0.11
query24	2.96	0.43	0.35
query25	0.12	0.05	0.04
query26	0.73	0.20	0.16
query27	0.04	0.04	0.03
query28	3.54	0.97	0.53
query29	12.48	4.08	3.25
query30	0.28	0.16	0.15
query31	2.77	0.60	0.31
query32	3.21	0.59	0.48
query33	3.24	3.25	3.27
query34	15.83	4.26	3.59
query35	3.56	3.53	3.53
query36	0.57	0.46	0.41
query37	0.09	0.07	0.07
query38	0.05	0.04	0.04
query39	0.04	0.03	0.02
query40	0.19	0.16	0.15
query41	0.10	0.03	0.03
query42	0.03	0.03	0.03
query43	0.05	0.04	0.03
Total cold run time: 96.92 s
Total hot run time: 25.18 s

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 100.00% (2/2) 🎉
Increment coverage report
Complete coverage report

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.1.x reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Doris does not support accessing Iceberg external tables based on BOS.

3 participants