Skip to content

[improvement](be) Enable libdeflate decompression for Parquet GZIP and ORC ZLIB on all architectures - #68593

Open
hubgeter wants to merge 4 commits into
apache:masterfrom
hubgeter:arm64-libdeflate-gzip-zlib
Open

hubgeter wants to merge 4 commits into
apache:masterfrom
hubgeter:arm64-libdeflate-gzip-zlib

Conversation

@hubgeter

@hubgeter hubgeter commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Related PR: apache/doris-thirdparty#417, apache/doris-thirdparty#418

Problem Summary:

Parquet GZIP pages and ORC ZLIB streams are decompressed with libdeflate only on x86 (#27542, #27669). On AArch64 both fall back to zlib inflate, which is several times slower. The x86-only restriction was never needed:

  • libdeflate is built for every platform by build-thirdparty.sh.
  • The official doris-thirdparty-prebuilt-linux-aarch64 package ships an aarch64 libdeflate.a, reachable through the usual installed/lib -> lib64 link.

This PR:

  • links deflate unconditionally in be/cmake/thirdparty.cmake;
  • removes the architecture guards in be/src/util/block_compression.cpp, so Parquet GZIP always uses GzipBlockCompressionByLibdeflate;
  • bumps contrib/apache-orc to include [improvement] Enable libdeflate for ZLIB decompression on all architectures doris-thirdparty#417, which does the same for ORC CompressionKind_ZLIB (ZlibDecompressionStreamByLibDeflate).
  • makes GzipBlockCompressionByLibdeflate require a page to expand to exactly the declared size.
    • Before, an empty page returned OK even when the header declared uncompressed bytes, and a page that expanded to fewer bytes than declared was accepted. The Parquet readers only check the Status, so a dictionary page with compressed_page_size=0 could be decoded from an unwritten buffer.
    • Now empty input is accepted only for an empty output, and libdeflate rejects short output (no actual_out_nbytes_ret).
    • This also changes x86, where this codec was already used.
  • bumps contrib/apache-orc to include [improvement] Allocate the block decompression input buffer lazily doris-thirdparty#418, which allocates ORC's block decompression input buffer lazily, so libdeflate ZLIB streams no longer hold an extra block per stream.

Release note

Use libdeflate to decompress Parquet GZIP and ORC ZLIB data on ARM64.

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

… all architectures

Parquet GZIP pages were decompressed by libdeflate only on x86; AArch64 fell
back to zlib inflate. libdeflate is already built for every platform by
build-thirdparty.sh and ships in both linux prebuilt packages, so link it
unconditionally and use GzipBlockCompressionByLibdeflate everywhere.

Add a unit test that checks the Parquet GZIP codec against the zlib gzip codec
for block sizes from 1 byte to 8 MB, and that empty input, an undersized
output buffer, truncated streams, corrupted header/deflate/CRC bytes and
non-gzip input are handled with an error instead of partial data.
@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?

@hubgeter
hubgeter marked this pull request as draft September 29, 2026 02:06
…on all architectures

Pick up apache/doris-thirdparty#417, which removes the x86-only guards around
ZlibDecompressionStreamByLibDeflate, so ORC ZLIB streams are decoded with
libdeflate on AArch64 as well.
@hubgeter hubgeter changed the title [improvement](be) Enable libdeflate gzip decompression for Parquet on all architectures [improvement](be) Enable libdeflate decompression for Parquet GZIP and ORC ZLIB on all architectures Sep 29, 2026
@hubgeter

Copy link
Copy Markdown
Contributor Author

run buildall

@hubgeter

Copy link
Copy Markdown
Contributor Author

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

Request changes for two AArch64 regressions, detailed inline: a zero-byte Parquet GZIP dictionary page can be accepted without producing its declared bytes, and ORC ZLIB streams now allocate an avoidable block-sized scratch buffer per stream.

Review checkpoints:

  • Goal and tests: The CMake link, Parquet codec selection, and ORC submodule implement the intended all-architecture switch. The new BE and ORC unit cases cover normal and malformed streams, but the BE test misses empty compressed input with a positive expected output size, and the ORC test does not cover per-stream memory. This was a static review; I did not run builds or tests, and the PR's reported test results were not independently verified.
  • Scope and reuse: The patch reuses existing codecs and is focused, subject to the two inline corrections. No new configuration, FE/BE variable, persisted format, or rolling-upgrade protocol is added.
  • Data correctness and errors: The Parquet case violates the codec's output-size/error contract and lets the legacy reader consume unwritten dictionary bytes. Other observed decompression errors propagate as Status or ParseError. No transaction, visible-version, data-write, or crash-recovery flow changes here.
  • Concurrency and lifecycle: The BE libdeflate decompressor is thread-local; ORC owns a decompressor per stream and releases it with the reader. I found no new shared-state race, lock-order issue, or cross-translation-unit initialization dependency. The ORC scratch allocation lasts for the live stream/stripe.
  • Parallel paths and compatibility: I traced both Parquet readers, ORC chunk and seek handling, source/prebuilt dependency layout, and Linux/macOS link order. No additional valid-stream or link failure was substantiated. A final glibc/OS artifact audit is unavailable without a build, which this review contract prohibits.
  • Performance, coverage, and observability: The ORC buffer cost is the material performance finding; neither added test measures it. No test-result files or observability interfaces change. No additional user review focus was supplied.

Review complete after two rounds of independent coverage and a final changed-file sweep. Both inline issues remain open for the author to address.

@@ -1663,13 +1653,7 @@ Status get_block_compression_codec(tparquet::CompressionCodec::type parquet_code
*codec = ZstdBlockCompression::instance();
break;
case tparquet::CompressionCodec::GZIP:

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.

[P1] Reject empty GZIP input when the page expects output. On AArch64 this now selects GzipBlockCompressionByLibdeflate, whose empty-input branch returns OK and sets output->size = 0 even when the caller provided a nonzero destination. A dictionary page with num_values=1, uncompressed_page_size=4, and compressed_page_size=0 reaches the legacy Parquet reader; it checks only Status and then reads the unwritten four-byte allocation as an INT32 dictionary value. The previous ARM zlib path rejected that page, and the new test exercises empty input only with an empty destination. Please reject this size mismatch and test it.

Comment thread contrib/apache-orc Outdated
@@ -1 +1 @@
Subproject commit be0f1b73a7aeb78824a03e0dcb692c50a176d513
Subproject commit 34a46c9e2de3214eea527f50c45c94264c14cdcd

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.

[P2] Allocate the ORC input scratch only when a chunk spans input buffers. On ARM this submodule update switches ZLIB streams to ZlibDecompressionStreamByLibDeflate, whose BlockDecompressionStream base immediately allocates and zeroes inputDataBuffer(pool, blockSize) for every stream, in addition to the existing output buffer. A nullable direct-string column opens PRESENT, LENGTH, and DATA streams; 100 selected columns at a valid 256 KiB block size therefore add about 75 MiB per active reader before data is read. Doris defaults to an 8 MiB natural input read, so this scratch is often unused. NextDecompress needs it only for split chunks; lazy allocation would preserve the fast path without this wide-scan memory cost.

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17631	3808	3763	3763
q2	2170	377	324	324
q3	10054	1440	812	812
q4	4681	474	353	353
q5	7496	832	539	539
q6	174	183	137	137
q7	759	802	600	600
q8	9361	1543	1532	1532
q9	5436	4195	4175	4175
q10	6831	1327	1032	1032
q11	422	266	238	238
q12	629	421	296	296
q13	18091	2614	2043	2043
q14	265	258	245	245
q15	q16	738	719	659	659
q17	1721	1128	1006	1006
q18	6473	5626	5523	5523
q19	1165	1274	1106	1106
q20	482	399	262	262
q21	5428	2885	2589	2589
q22	419	337	294	294
Total cold run time: 100426 ms
Total hot run time: 27528 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4166	4074	4065	4065
q2	715	558	520	520
q3	4472	4813	4363	4363
q4	2215	2308	1440	1440
q5	4215	4106	4080	4080
q6	219	170	124	124
q7	1727	1598	1435	1435
q8	2190	2169	2208	2169
q9	7546	7507	7569	7507
q10	3703	3871	3151	3151
q11	552	414	370	370
q12	742	725	515	515
q13	2449	2811	2141	2141
q14	301	306	257	257
q15	q16	725	707	659	659
q17	7729	7169	7063	7063
q18	12188	11170	11750	11170
q19	1177	1061	1061	1061
q20	2219	2261	2012	2012
q21	5317	4351	4499	4351
q22	539	465	420	420
Total cold run time: 65106 ms
Total hot run time: 58873 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 153283 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 2ceb24c1dd7c60f1e6c905a501c9c8ca8d139f46, data reload: false

query5	4340	618	460	460
query6	427	214	186	186
query7	4812	550	279	279
query8	319	176	159	159
query9	8802	3966	3987	3966
query10	480	293	281	281
query11	5824	3551	3240	3240
query12	142	91	84	84
query13	1288	608	440	440
query14	6524	4530	4216	4216
query14_1	3946	3923	3940	3923
query15	203	199	184	184
query16	989	475	465	465
query17	917	679	560	560
query18	2420	463	331	331
query19	226	173	133	133
query20	84	81	78	78
query21	216	130	110	110
query22	13002	12979	12875	12875
query23	13915	12869	12564	12564
query23_1	12587	12447	12372	12372
query24	7192	1181	732	732
query24_1	678	720	685	685
query25	534	413	357	357
query26	1261	305	163	163
query27	2710	522	319	319
query28	4537	1974	1973	1973
query29	1655	711	519	519
query30	302	221	184	184
query31	890	755	622	622
query32	144	98	93	93
query33	510	299	234	234
query34	1163	1109	607	607
query35	701	756	651	651
query36	810	822	709	709
query37	137	100	90	90
query38	1826	1746	1689	1689
query39	703	694	657	657
query39_1	648	650	640	640
query40	225	121	102	102
query41	67	66	64	64
query42	97	92	94	92
query43	333	338	289	289
query44	1367	715	703	703
query45	176	174	158	158
query46	1043	1167	709	709
query47	1502	1497	1431	1431
query48	414	417	283	283
query49	562	406	291	291
query50	945	337	261	261
query51	11417	11238	11222	11222
query52	89	91	78	78
query53	246	259	188	188
query54	282	211	202	202
query55	79	74	71	71
query56	252	227	217	217
query57	1536	1415	1336	1336
query58	324	238	250	238
query59	1972	2041	1877	1877
query60	283	246	220	220
query61	146	147	145	145
query62	405	319	265	265
query63	216	172	172	172
query64	2797	997	782	782
query65	3459	3411	3422	3411
query66	1794	418	302	302
query67	20104	20295	19954	19954
query68	3293	1537	954	954
query69	409	297	257	257
query70	892	842	803	803
query71	291	238	220	220
query72	2784	2524	2256	2256
query73	815	713	435	435
query74	4636	4475	4275	4275
query75	2307	2271	1939	1939
query76	2329	1135	739	739
query77	344	389	287	287
query78	8891	8889	8467	8467
query79	1204	1142	723	723
query80	534	441	370	370
query81	523	329	281	281
query82	270	168	124	124
query83	209	223	192	192
query84	294	143	112	112
query85	806	472	375	375
query86	290	243	234	234
query87	1969	1946	1821	1821
query88	3609	2723	2702	2702
query89	326	273	245	245
query90	2132	178	177	177
query91	169	158	128	128
query92	97	88	88	88
query93	1413	1455	866	866
query94	508	341	320	320
query95	688	469	337	337
query96	988	780	299	299
query97	2413	2429	2345	2345
query98	155	147	145	145
query99	729	732	617	617
Total cold run time: 235937 ms
Total hot run time: 153283 ms

@hello-stephen

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

query1	0.01	0.01	0.00
query2	0.08	0.05	0.05
query3	0.26	0.13	0.13
query4	1.62	0.14	0.15
query5	0.25	0.22	0.22
query6	1.16	0.91	0.91
query7	0.04	0.01	0.01
query8	0.06	0.03	0.03
query9	0.40	0.34	0.33
query10	0.57	0.54	0.56
query11	0.20	0.14	0.14
query12	0.18	0.14	0.14
query13	0.46	0.46	0.47
query14	0.94	0.95	0.95
query15	0.61	0.59	0.58
query16	0.33	0.32	0.31
query17	1.07	1.08	1.08
query18	0.22	0.20	0.20
query19	2.06	1.93	1.95
query20	0.02	0.01	0.01
query21	15.42	0.23	0.15
query22	4.72	0.05	0.05
query23	16.20	0.31	0.13
query24	2.99	0.45	0.32
query25	0.11	0.04	0.04
query26	0.73	0.21	0.14
query27	0.05	0.05	0.03
query28	3.54	0.86	0.37
query29	12.54	4.07	3.22
query30	0.30	0.15	0.17
query31	2.78	0.57	0.31
query32	3.23	0.58	0.50
query33	3.25	3.23	3.19
query34	15.76	3.98	3.27
query35	3.25	3.24	3.20
query36	0.57	0.42	0.41
query37	0.09	0.07	0.06
query38	0.05	0.04	0.04
query39	0.03	0.04	0.03
query40	0.18	0.15	0.15
query41	0.09	0.03	0.03
query42	0.04	0.04	0.04
query43	0.05	0.04	0.03
Total cold run time: 96.51 s
Total hot run time: 24.02 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.39% (34521/45193)
Line Coverage 61.33% (388210/632997)
Region Coverage 57.67% (326744/566532)
Branch Coverage 58.56% (149326/254982)

…d size

GzipBlockCompressionByLibdeflate returned OK for an empty page even when the
page header declared uncompressed bytes, and accepted a page that expanded to
fewer bytes than declared. The Parquet readers only check the Status, so a
dictionary page with compressed_page_size=0 left its dictionary buffer
unwritten and decoded it as values.

Page headers give the exact uncompressed size, so require the page to fill the
output buffer: accept empty input only for an empty output, and let libdeflate
reject short output by not passing actual_out_nbytes_ret.
… input buffer lazily

Pick up apache/doris-thirdparty#418, so ORC block decompression streams no
longer allocate an input scratch block per stream unless a chunk spans input
buffers.
@hubgeter

Copy link
Copy Markdown
Contributor Author

run buildall

@hubgeter

Copy link
Copy Markdown
Contributor Author

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

Complete static review of PR #68593 at head 3b7ad3b. One new P2 issue is inline: the updated ORC submodule leaves its standalone ARM test and tool targets without a libdeflate link dependency. The normal Doris BE link includes deflate.

Existing review context: P1 comment 4129170058 is fixed by rejecting empty GZIP input when output bytes are declared and by using libdeflate's exact-output mode; the added unit case covers that input. P2 comment 4129170064 is fixed by ORC commit 5860f947, which grows input scratch only for a split chunk. Neither prior issue still applies, so there is no existing blocking comment ID for this head.

Review checkpoints:

  • Goal and proof: Parquet GZIP and ORC ZLIB select libdeflate on ARM, and the BE dependency list includes it. The new BE and ORC unit cases exercise normal, malformed, contiguous, and split input. I did not run builds, tests, benchmarks, or an ELF audit because this review environment prohibits builds; test results stated in the PR were not independently verified.
  • Scope and reuse: The change is focused on codec selection, its dependency, targeted tests, and the ORC submodule. It reuses the existing codec and stream interfaces. The ORC target link declaration is the remaining integration gap.
  • Concurrency and lifecycle: The BE decompressor is thread-local; each ORC stream owns its decompressor and scratch through the reader's memory pool. No new shared mutable state, lock acquisition, deadlock path, cross-translation-unit initializer dependency, or abnormal release path was found.
  • Configuration and compatibility: No configuration item, FE/BE variable, protocol, function symbol contract, or persisted storage format changes. Thirdparty source builds include libdeflate and the BE link includes it; ORC's own executables do not inherit that link. No built artifact was available to verify the glibc 2.17 runtime baseline or ARM binary behavior.
  • Parallel paths and conditions: Both legacy and native Parquet readers pass declared sizes through cold and compressed-cache data and dictionary paths, including page-v2 level subtraction, and propagate decompression failures. The empty-input exception is limited to zero expected output. ORC contiguous/split chunks and seek/BackUp paths were reviewed; lazy scratch does not recreate the prior per-stream block allocation.
  • Tests and results: The BE unit test covers valid sizes, short/long output, truncation, corruption, and empty input; ORC submodule tests cover malformed chunks and memory-pool allocation for contiguous/split inputs. No end-to-end regression test or result file changed. This is static coverage assessment, not a claim that tests passed here.
  • Observability and performance: New Parquet failures include the libdeflate result and input/output sizes; existing ORC ParseError behavior remains. No new metric is required by this decoder switch. The large eager ORC scratch cost is fixed; throughput improvement was not independently measured.
  • Data safety and remaining scope: These are read/decompression paths; no transaction, visible-version, delete-bitmap, persistence, data-write, crash-recovery, or cloud write flow changes. Errors propagate instead of allowing a short decoded page to be consumed. No additional user review focus was supplied.

Review completed after two convergence rounds, independent validation of the one new finding, and a final sweep of all four changed paths and live inline threads.

Comment thread contrib/apache-orc
@@ -1 +1 @@
Subproject commit be0f1b73a7aeb78824a03e0dcb692c50a176d513

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.

[P2] Link libdeflate from ORC's own targets on ARM. This revision makes ZlibDecompressionStreamByLibDeflate unconditional, so liborc.a now references libdeflate_* on ARM. The submodule's orc target still links only protobuf, zlib, snappy, lz4, zstd, and HDFS; orc-test and tools such as orc-contents link through that target without libdeflate. Building those targets on ARM therefore fails with undefined libdeflate symbols. Doris's COMMON_THIRDPARTY link group covers doris_be, not these executables. Please declare libdeflate on the ORC target and update this submodule pointer.

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17668	3943	3919	3919
q2	2198	356	306	306
q3	10096	1357	801	801
q4	4679	482	347	347
q5	7491	810	544	544
q6	174	175	142	142
q7	733	783	602	602
q8	9289	1481	1486	1481
q9	5519	4201	4161	4161
q10	6820	1322	1023	1023
q11	430	271	241	241
q12	631	409	289	289
q13	18056	2615	2002	2002
q14	264	252	237	237
q15	q16	725	724	662	662
q17	1661	1133	966	966
q18	6443	5602	5552	5552
q19	1184	1217	1041	1041
q20	467	378	265	265
q21	5514	2986	2632	2632
q22	421	348	294	294
Total cold run time: 100463 ms
Total hot run time: 27507 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4228	4095	4137	4095
q2	701	574	530	530
q3	4482	4885	4312	4312
q4	2203	2312	1425	1425
q5	4219	4086	4086	4086
q6	226	177	128	128
q7	1709	1589	1413	1413
q8	2161	1893	1872	1872
q9	6891	6864	6832	6832
q10	3628	3569	3097	3097
q11	521	384	349	349
q12	698	709	510	510
q13	2283	2651	2000	2000
q14	266	288	250	250
q15	q16	672	683	608	608
q17	7307	6765	6673	6673
q18	11918	11093	11673	11093
q19	1095	1029	1020	1020
q20	2195	2196	1916	1916
q21	4947	4088	4259	4088
q22	532	476	425	425
Total cold run time: 62882 ms
Total hot run time: 56722 ms

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17966	3979	3892	3892
q2	2219	363	312	312
q3	10076	1423	813	813
q4	4686	484	366	366
q5	7481	822	556	556
q6	183	173	138	138
q7	744	800	640	640
q8	9315	1586	1576	1576
q9	5505	4256	4262	4256
q10	6821	1353	1026	1026
q11	444	285	251	251
q12	630	408	287	287
q13	18095	2630	1992	1992
q14	265	252	237	237
q15	q16	739	722	659	659
q17	1800	1104	1057	1057
q18	6491	5626	5555	5555
q19	1239	1264	1020	1020
q20	470	386	256	256
q21	5648	3574	3027	3027
q22	440	378	300	300
Total cold run time: 101257 ms
Total hot run time: 28216 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4750	4741	4498	4498
q2	757	591	540	540
q3	4788	5244	4605	4605
q4	2197	2524	1486	1486
q5	4542	4577	4460	4460
q6	235	174	128	128
q7	1807	1708	1532	1532
q8	2386	2079	2003	2003
q9	7390	7267	7210	7210
q10	3602	3570	3089	3089
q11	513	369	345	345
q12	714	701	497	497
q13	2268	2613	2017	2017
q14	261	280	249	249
q15	q16	655	683	588	588
q17	7335	6725	6679	6679
q18	11813	11073	11802	11073
q19	1097	1041	1041	1041
q20	2221	2191	1905	1905
q21	5011	4143	4345	4143
q22	533	466	438	438
Total cold run time: 64875 ms
Total hot run time: 58526 ms

@hello-stephen

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

query5	4301	604	473	473
query6	445	221	203	203
query7	4824	538	302	302
query8	341	180	183	180
query9	8834	4039	3971	3971
query10	454	312	260	260
query11	5774	3549	3238	3238
query12	147	92	88	88
query13	1278	593	419	419
query14	6515	4504	4229	4229
query14_1	3978	3938	3986	3938
query15	202	203	184	184
query16	982	502	452	452
query17	900	686	544	544
query18	2445	490	337	337
query19	197	180	149	149
query20	84	82	82	82
query21	223	139	115	115
query22	13073	13000	12855	12855
query23	13967	13039	12572	12572
query23_1	12592	12413	12388	12388
query24	7184	1173	663	663
query24_1	665	676	709	676
query25	560	443	370	370
query26	1246	320	166	166
query27	2672	592	326	326
query28	4559	1981	1979	1979
query29	1658	716	536	536
query30	310	225	186	186
query31	881	767	635	635
query32	153	98	93	93
query33	529	314	255	255
query34	1194	1100	639	639
query35	716	751	666	666
query36	789	777	723	723
query37	143	112	93	93
query38	1836	1755	1717	1717
query39	715	698	685	685
query39_1	643	641	653	641
query40	222	127	104	104
query41	72	69	69	69
query42	100	93	94	93
query43	334	350	304	304
query44	1355	716	714	714
query45	224	176	161	161
query46	1059	1142	739	739
query47	1503	1483	1373	1373
query48	395	382	315	315
query49	605	403	293	293
query50	982	345	259	259
query51	10661	10372	10423	10372
query52	85	86	81	81
query53	228	245	174	174
query54	249	211	193	193
query55	83	72	67	67
query56	217	210	204	204
query57	1464	1457	1320	1320
query58	291	261	255	255
query59	1967	2042	1849	1849
query60	274	235	217	217
query61	146	145	148	145
query62	391	319	269	269
query63	215	174	178	174
query64	2811	973	795	795
query65	3487	3408	3407	3407
query66	1772	435	309	309
query67	19958	19727	19819	19727
query68	3221	1444	896	896
query69	403	317	262	262
query70	896	825	818	818
query71	292	247	236	236
query72	2645	2528	2269	2269
query73	825	805	415	415
query74	4586	4513	4279	4279
query75	2282	2291	1931	1931
query76	2305	1078	760	760
query77	377	402	299	299
query78	9164	9081	8494	8494
query79	1310	1256	763	763
query80	589	459	382	382
query81	538	321	279	279
query82	788	163	129	129
query83	318	228	202	202
query84	320	137	117	117
query85	833	452	374	374
query86	328	241	231	231
query87	1988	1985	1837	1837
query88	3587	2706	2671	2671
query89	374	280	242	242
query90	1960	184	184	184
query91	174	157	130	130
query92	106	86	89	86
query93	1493	1445	817	817
query94	547	348	298	298
query95	664	371	346	346
query96	1119	785	335	335
query97	2443	2432	2341	2341
query98	163	152	146	146
query99	727	738	622	622
Total cold run time: 236229 ms
Total hot run time: 152455 ms

@hello-stephen

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

query1	0.00	0.00	0.00
query2	0.09	0.05	0.05
query3	0.26	0.14	0.14
query4	1.61	0.15	0.14
query5	0.24	0.22	0.23
query6	1.21	1.00	0.93
query7	0.04	0.01	0.01
query8	0.06	0.04	0.04
query9	0.39	0.33	0.33
query10	0.55	0.56	0.58
query11	0.20	0.14	0.15
query12	0.18	0.16	0.15
query13	0.47	0.48	0.47
query14	0.96	0.94	0.94
query15	0.60	0.61	0.58
query16	0.35	0.32	0.33
query17	1.09	1.12	1.10
query18	0.23	0.20	0.21
query19	1.96	1.94	1.99
query20	0.02	0.02	0.01
query21	15.49	0.22	0.15
query22	4.92	0.06	0.06
query23	16.12	0.30	0.12
query24	2.98	0.41	0.32
query25	0.11	0.06	0.04
query26	0.73	0.20	0.15
query27	0.04	0.04	0.03
query28	3.60	0.79	0.36
query29	12.47	4.02	3.18
query30	0.28	0.15	0.16
query31	2.77	0.54	0.30
query32	3.23	0.59	0.48
query33	3.13	3.16	3.24
query34	15.79	3.96	3.28
query35	3.21	3.19	3.27
query36	0.56	0.44	0.43
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.03	0.04
query40	0.17	0.16	0.15
query41	0.09	0.03	0.02
query42	0.04	0.03	0.03
query43	0.05	0.04	0.03
Total cold run time: 96.46 s
Total hot run time: 24.03 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.59% (34866/45525)
Line Coverage 61.72% (393489/637515)
Region Coverage 58.23% (331977/570112)
Branch Coverage 59.07% (152143/257574)

@hubgeter
hubgeter marked this pull request as ready for review September 29, 2026 13:00
@Gabriel39

Copy link
Copy Markdown
Contributor

Reviewed head 3b7ad3b3ec0c4efbbf4781008b63301b64230464. The empty/short GZIP output checks and the lazy ORC scratch-buffer allocation address the earlier correctness and memory concerns.

One build dependency issue remains, also noted in the existing inline comment: ORC's own target does not declare its libdeflate dependency.

The pinned ORC revision now calls libdeflate_* unconditionally, including on ARM64, but its target_link_libraries(orc ...) still lists only protobuf, zlib, snappy, lz4, zstd, and HDFS libraries. ORC executables such as orc-test, orc-contents, and orc-scan link through that target and do not add libdeflate themselves. Building those targets on ARM64 without manually supplying additional linker flags will therefore leave unresolved libdeflate_* symbols.

Doris's final BE link includes libdeflate through COMMON_THIRDPARTY, so a passing BE build does not validate these separate ORC targets. The dependency omission already affected the x86 libdeflate path; this change extends it to ARM64.

Please declare libdeflate as a transitive dependency of the ORC target, ensure the standalone build can discover its headers/library, and update the submodule pointer. Validate an ORC test/tool executable as well as the Doris BE build on ARM64.

This conclusion is based on source and CMake inspection. I did not run an ARM64 build or reproduce the linker failure locally.

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.

3 participants