You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Gabriel39 (via GitHub)" <gi...@apache.org> on 2026/10/16 03:39:49 UTC

[PR] [fix](hive) Keep compressed text files in whole scan ranges [doris]

Gabriel39 opened a new pull request, #69167:
URL: https://github.com/apache/doris/pull/69167

   ### What problem does this PR solve?
   
   `test_hive_compress_type_large_data` succeeds with the default file split size but fails after setting `file_split_size=8388608`:
   
   ```
   [INTERNAL_ERROR] For now we do not support split compressed file
   ```
   
   Hive's planner used the table-level TEXT/CSV splittability for every file. For example, a 20 MiB gzip file was assigned ranges starting at 0, 8 MiB and 16 MiB. Both native text/CSV readers reject compressed streams starting at a nonzero offset. The same partition can contain plain and compressed files, so a table-wide decision is insufficient.
   
   Determine splittability per file in the common range iterator used by synchronous, partition-batch and streaming scans. Recognized compressed TEXT/CSV files now produce one complete range starting at zero. Plain text still splits; ORC/Parquet keep their existing range planning. Hadoop codec splittability is not used because the native readers have different restart capabilities.
   
   Move the existing filename-to-codec inference into a shared, dependency-free foundation enum and delegate `Util.inferFileCompressTypeByPath` to it. This keeps planning and the codec sent to BE on the same suffix rules, without changing supported suffixes, Hive's LZ4 adjustment, LZO sidecar filtering, or the BE safety checks.
   
   ### Validation
   
   - The new mixed-file planner test fails on the original code (33 ranges instead of 13) and passes with the fix. It covers TEXT/CSV, ORC/Parquet, all recognized compression suffixes and uppercase gzip, empty files, plain-file offsets/lengths, and synchronous/batch/streaming enumeration.
   - `mvn -f fe/pom.xml -pl :fe-connector-hive -am test -Dmaven.build.cache.enabled=false`: 1,462 tests passed, zero failures/errors/skips; 510 tests in the Hive module.
   - Foundation tests cover unchanged codec recognition and unknown-suffix behavior; connector tests verify the shared enum names map to native Thrift codecs.
   - The existing large-data regression retains its cardinality/filter assertions, forces synchronous 8 MiB queries, and compares forced streaming queries with the default-size results. Groovy syntax compilation passed.
   - FE Checkstyle and `git diff --check` passed.
   
   A live Hive environment was not exercised locally. The external regression and full FE integration build remain for CI.
   
   ### Release note
   
   Fix Hive compressed-text queries failing when file split sizes are smaller than the compressed files.
   
   ### Check List (For Author)
   
   - [x] Unit Test
   - [x] Regression test extension
   - [x] Behavior changed: compressed native text files are read as whole streams
   - [x] No documentation needed
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](hive) Keep compressed text files in whole scan ranges [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69167:
URL: https://github.com/apache/doris/pull/69167#issuecomment-6208929552

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 151690 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit cd58bd6506bbc121a8f1fc6d465f3eaa005d7dec, data reload: false
   
   query5	4320	568	454	454
   query6	421	207	188	188
   query7	4900	429	220	220
   query8	312	168	159	159
   query9	8747	3937	3928	3928
   query10	474	314	250	250
   query11	5949	3763	3548	3548
   query12	154	96	86	86
   query13	1270	426	338	338
   query14	6115	4008	3710	3710
   query14_1	3561	3511	3542	3511
   query15	210	199	182	182
   query16	946	453	420	420
   query17	847	663	531	531
   query18	2416	422	309	309
   query19	210	168	141	141
   query20	85	88	81	81
   query21	206	137	109	109
   query22	12970	12954	12898	12898
   query23	13476	12853	12394	12394
   query23_1	12676	12655	12522	12522
   query24	7122	830	474	474
   query24_1	481	471	466	466
   query25	539	419	361	361
   query26	1335	263	141	141
   query27	2782	446	282	282
   query28	4618	1945	1966	1945
   query29	1573	602	481	481
   query30	314	223	181	181
   query31	998	930	806	806
   query32	144	97	88	88
   query33	548	309	250	250
   query34	977	853	544	544
   query35	736	745	624	624
   query36	812	816	719	719
   query37	127	97	86	86
   query38	1792	1761	1695	1695
   query39	792	796	742	742
   query39_1	737	747	732	732
   query40	207	109	93	93
   query41	66	63	63	63
   query42	83	81	80	80
   query43	367	378	322	322
   query44	1289	686	685	685
   query45	185	173	159	159
   query46	856	990	555	555
   query47	2987	3038	2897	2897
   query48	297	309	213	213
   query49	580	406	292	292
   query50	673	285	218	218
   query51	10767	10570	10652	10570
   query52	80	82	71	71
   query53	188	208	151	151
   query54	232	194	209	194
   query55	73	66	65	65
   query56	229	212	216	212
   query57	1614	1575	1530	1530
   query58	273	260	258	258
   query59	2116	2184	1947	1947
   query60	299	239	226	226
   query61	147	147	152	147
   query62	396	338	286	286
   query63	193	165	165	165
   query64	2722	919	762	762
   query65	3290	3247	3252	3247
   query66	1770	415	304	304
   query67	20151	20044	19667	19667
   query68	3115	1003	604	604
   query69	370	274	232	232
   query70	843	783	817	783
   query71	295	226	200	200
   query72	2830	2691	2339	2339
   query73	518	532	290	290
   query74	4603	4440	4310	4310
   query75	2346	2284	1955	1955
   query76	2373	1016	579	579
   query77	316	368	275	275
   query78	9632	9625	9086	9086
   query79	875	882	514	514
   query80	538	417	326	326
   query81	538	320	265	265
   query82	585	132	112	112
   query83	309	202	182	182
   query84	311	125	104	104
   query85	856	415	363	363
   query86	334	226	231	226
   query87	2032	1957	1837	1837
   query88	3586	2682	2650	2650
   query89	334	293	251	251
   query90	1852	177	177	177
   query91	161	159	126	126
   query92	96	84	87	84
   query93	1042	993	579	579
   query94	455	309	268	268
   query95	594	345	328	328
   query96	673	519	232	232
   query97	2468	2421	2333	2333
   query98	163	146	145	145
   query99	788	759	656	656
   Total cold run time: 234455 ms
   Total hot run time: 151690 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](hive) Keep compressed text files in whole scan ranges [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69167:
URL: https://github.com/apache/doris/pull/69167#issuecomment-6208883925

   # FE UT Coverage Report
   Increment line coverage `  100.00% (1/1)` :tada:
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/69167_cd58bd6506bbc121a8f1fc6d465f3eaa005d7dec/fe_increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/69167_cd58bd6506bbc121a8f1fc6d465f3eaa005d7dec/fe_report/index.html)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](hive) Keep compressed text files in whole scan ranges [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69167:
URL: https://github.com/apache/doris/pull/69167#issuecomment-6208987086

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 24.59 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit cd58bd6506bbc121a8f1fc6d465f3eaa005d7dec, data reload: false
   
   query1	0.01	0.01	0.00
   query2	0.10	0.05	0.04
   query3	0.27	0.12	0.12
   query4	1.61	0.13	0.13
   query5	0.27	0.22	0.25
   query6	1.17	0.68	0.67
   query7	0.04	0.00	0.00
   query8	0.06	0.04	0.03
   query9	0.41	0.36	0.35
   query10	0.63	0.57	0.59
   query11	0.20	0.13	0.14
   query12	0.19	0.14	0.15
   query13	0.51	0.49	0.48
   query14	1.01	1.02	1.01
   query15	0.64	0.60	0.61
   query16	0.34	0.34	0.35
   query17	1.15	1.14	1.11
   query18	0.22	0.23	0.21
   query19	2.09	1.97	1.93
   query20	0.02	0.01	0.01
   query21	15.51	0.27	0.14
   query22	4.40	0.05	0.05
   query23	16.26	0.32	0.12
   query24	3.19	0.55	0.52
   query25	0.10	0.08	0.05
   query26	1.57	0.24	0.15
   query27	0.05	0.04	0.03
   query28	2.69	0.60	0.41
   query29	12.49	4.22	3.33
   query30	0.29	0.14	0.14
   query31	2.77	0.56	0.35
   query32	3.22	0.60	0.51
   query33	3.12	3.24	3.19
   query34	15.60	3.94	3.39
   query35	3.32	3.35	3.33
   query36	0.56	0.44	0.45
   query37	0.10	0.06	0.07
   query38	0.05	0.04	0.04
   query39	0.03	0.03	0.03
   query40	0.17	0.14	0.13
   query41	0.08	0.03	0.03
   query42	0.04	0.03	0.03
   query43	0.04	0.03	0.03
   Total cold run time: 96.59 s
   Total hot run time: 24.59 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](hive) Keep compressed text files in whole scan ranges [doris]

Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 commented on PR #69167:
URL: https://github.com/apache/doris/pull/69167#issuecomment-6207548509

   /review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](hive) Keep compressed text files in whole scan ranges [doris]

Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 commented on PR #69167:
URL: https://github.com/apache/doris/pull/69167#issuecomment-6207548149

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](hive) Keep compressed text files in whole scan ranges [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #69167:
URL: https://github.com/apache/doris/pull/69167#issuecomment-6211052001

   PR approved by anyone and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](hive) Keep compressed text files in whole scan ranges [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #69167:
URL: https://github.com/apache/doris/pull/69167#issuecomment-6211052600

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](hive) Keep compressed text files in whole scan ranges [doris]

Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 merged PR #69167:
URL: https://github.com/apache/doris/pull/69167


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](hive) Keep compressed text files in whole scan ranges [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69167:
URL: https://github.com/apache/doris/pull/69167#issuecomment-6208813219

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 29573 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit cd58bd6506bbc121a8f1fc6d465f3eaa005d7dec, data reload: false
   
   ------ Round 1 ----------------------------------
   ============================================
   q1	17626	5647	5558	5558
   q2	2113	315	270	270
   q3	10224	1420	847	847
   q4	4684	470	345	345
   q5	7450	801	529	529
   q6	191	197	154	154
   q7	758	807	611	611
   q8	9257	1342	1121	1121
   q9	5546	4271	4260	4260
   q10	6818	1299	994	994
   q11	422	248	235	235
   q12	634	398	283	283
   q13	18077	3487	2977	2977
   q14	287	260	250	250
   q15	q16	730	721	684	684
   q17	1181	744	578	578
   q18	6997	6195	6164	6164
   q19	1101	941	591	591
   q20	378	331	233	233
   q21	4881	2569	2706	2569
   q22	414	358	320	320
   Total cold run time: 99769 ms
   Total hot run time: 29573 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   ============================================
   q1	6752	6582	6731	6582
   q2	723	636	569	569
   q3	5718	5783	5357	5357
   q4	2003	2116	1580	1580
   q5	5777	5536	5823	5536
   q6	246	209	145	145
   q7	2283	2029	1754	1754
   q8	3193	2729	2775	2729
   q9	8094	8037	7946	7946
   q10	3657	3587	3252	3252
   q11	648	399	367	367
   q12	649	687	490	490
   q13	3275	3615	3013	3013
   q14	304	286	275	275
   q15	q16	664	674	616	616
   q17	7920	6985	6850	6850
   q18	13214	12264	13002	12264
   q19	926	803	789	789
   q20	2170	2163	1942	1942
   q21	5819	4718	4823	4718
   q22	504	454	398	398
   Total cold run time: 74539 ms
   Total hot run time: 67172 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](hive) Keep compressed text files in whole scan ranges [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #69167:
URL: https://github.com/apache/doris/pull/69167#issuecomment-6207546254

   
   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://doris.apache.org/community/how-to-contribute/review-and-ci).
   
   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?
       


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org