Skip to content

[fix](arrow-flight) Return DATETIMEV2 as a timezone-naive Arrow timestamp#65780

Open
morningman wants to merge 3 commits into
apache:masterfrom
morningman:fix-adbc-datetime-timezone
Open

[fix](arrow-flight) Return DATETIMEV2 as a timezone-naive Arrow timestamp#65780
morningman wants to merge 3 commits into
apache:masterfrom
morningman:fix-adbc-datetime-timezone

Conversation

@morningman

@morningman morningman commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #65741

Problem Summary:

DATETIME / DATETIMEV2 is a timezone-naive wall-clock type, but over Arrow Flight / ADBC it was mapped to a timezone-aware Arrow timestamp built from the session timezone. Clients such as pyarrow/ADBC then interpreted the value as an instant and rendered a spurious timezone offset:

SELECT CAST('2026-07-02 01:36:22.069504' AS DATETIME(6))
-> 2026-07-02 01:36:22.069504+00:00   (wrong; should be timezone-naive)

Mapping DATETIMEV2 to a timezone-naive Arrow timestamp fixes this for pyarrow. However, it changes the wire encoding for consumers that interpret the value as an instant (java.sql.Timestamp via JDBC getObject(), or the Flink connector), which would shift the wall-clock value on a non-UTC client. To avoid breaking those consumers, the new behavior is gated behind a session variable, off by default.

Session variable: enable_arrow_flight_datetime_naive

Session scope, default false:

  • false (default): keep the previous timezone-aware Arrow mapping for DATETIME/DATETIMEV2 over Arrow Flight — no behavior change for existing clients.
  • true: map DATETIME/DATETIMEV2 to a timezone-naive Arrow timestamp carrying the wall-clock value (what pyarrow / getString() read exactly).

TIMESTAMPTZ always keeps its timezone. Other Arrow paths (Parquet export, Python UDF) are unaffected. On the read side, DataTypeDateTimeV2SerDe::read_column_from_arrow interprets a timezone-naive Arrow timestamp as UTC (mirroring the write side), so cross-cluster (type=doris) reads stay correct for both encodings.

Impact by scenario

Example: value 2024-07-19 12:00:00, client/session timezone +08:00.

Consumer default (= false) = true Note
MySQL protocol / most BI tools (not Arrow Flight) 12:00:00 12:00:00 unaffected — the majority of usage
pyarrow / ADBC 12:00:00+08:00 12:00:00 the fix (opt-in)
Arrow-Flight JDBC — getString() 12:00:00 12:00:00 correct both ways
Arrow-Flight JDBC — getObject()/getTimestamp() (java.sql.Timestamp) 12:00:00 04:00:00 the naive value is anchored by the client JVM timezone; shifts only on a non-UTC client
Flink Doris connector (Arrow Flight read) 12:00:00 20:00:00 the connector treats the value as an instant
type=doris federation (via use_arrow_flight) 12:00 12:00 unchanged
Parquet export / Python UDF unchanged unchanged not on the Arrow Flight result path

getObject()/getTimestamp() and the Flink connector shift only on a non-UTC client because java.sql.Timestamp (and the connector) represent the value as an absolute instant, so a timezone-less wall clock has to be anchored using the client timezone.

Release note

Add session variable enable_arrow_flight_datetime_naive (session scope, default off). When enabled, DATETIME/DATETIMEV2 returned over Arrow Flight / ADBC is a timezone-naive Arrow timestamp carrying the wall-clock value, so clients no longer see a spurious timezone offset.

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. A new session variable enable_arrow_flight_datetime_naive (default off) changes the Arrow Flight DATETIME mapping only when enabled; the default behavior is unchanged.
  • Does this need documentation?

    • No.
    • Yes. The new session variable should be documented on the Arrow Flight SQL / session-variable docs page.

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?

@morningman

Copy link
Copy Markdown
Contributor Author

/review

@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17795	4086	4014	4014
q2	2112	311	198	198
q3	10186	1415	834	834
q4	4684	471	337	337
q5	7575	849	571	571
q6	190	173	141	141
q7	772	825	605	605
q8	9871	1502	1605	1502
q9	6094	4343	4364	4343
q10	6812	1729	1464	1464
q11	509	344	320	320
q12	778	588	467	467
q13	20447	3443	2827	2827
q14	283	275	255	255
q15	q16	810	801	731	731
q17	954	981	1102	981
q18	7265	5728	5534	5534
q19	1420	1286	1093	1093
q20	844	673	606	606
q21	5858	2717	2310	2310
q22	438	355	308	308
Total cold run time: 105697 ms
Total hot run time: 29441 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4499	4376	4394	4376
q2	292	322	214	214
q3	4574	4928	4440	4440
q4	2049	2156	1340	1340
q5	4448	4287	4679	4287
q6	253	192	143	143
q7	2062	1786	1604	1604
q8	2471	2138	2222	2138
q9	7743	7670	7729	7670
q10	4696	4642	4391	4391
q11	605	425	386	386
q12	740	747	521	521
q13	3298	3587	2950	2950
q14	316	327	285	285
q15	q16	701	752	651	651
q17	1375	1350	1339	1339
q18	7977	7368	6819	6819
q19	1108	1076	1069	1069
q20	2224	2207	1948	1948
q21	5235	4579	4451	4451
q22	537	458	414	414
Total cold run time: 57203 ms
Total hot run time: 51436 ms

@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 completed for head 5c95ff786d415602c1b00ff45183587179c197b6 after two convergence rounds. Requesting changes for two P1 correctness regressions; one P3 test-lifecycle issue is also annotated inline.

Critical checkpoint conclusions:

  • Goal and proof: Mapping Doris DATETIMEV2 to a timezone-naive Arrow timestamp is correct for direct Arrow Flight/ADBC clients, and the added schema, unit round-trip, Arrow Flight, and same-head Remote Doris tests prove that path. The shared implementation does not yet accomplish the goal safely for every existing caller: forced-INT96 Parquet shifts same-version values, and a head producer shifts values for an older Remote Doris consumer.
  • Scope and clarity: The production edit is small and readable, but convert_to_arrow_type is a shared schema factory used beyond Arrow Flight. M3 shows that applying the client-facing change globally is too broad without Parquet-specific handling; M1 shows that the Remote Doris wire contract also needs version/capability scoping.
  • Concurrency and lifecycle: No new thread, shared mutable state, locking, static-initialization, ownership/COW, or resource-lifecycle behavior is introduced. The only lifecycle issue is M2 in the regression suite: it removes fixtures after the assertion despite the repository rule to retain them for debugging.
  • Configuration: No new configuration item is added. Existing FE and BE defaults set Parquet OUTFILE enable_int96_timestamps=true, which makes M3 a default, reachable path rather than an opt-in edge case.
  • Compatibility: M1 is an incompatible Arrow Flight wire-encoding change for a head-producer/base-consumer type=doris pairing. Base/base, base/head, and head/head preserve the wall clock; head/base silently shifts it by eight hours under Doris's +08:00 default. The ticket carries no encoding capability/version.
  • Parallel paths and conditions: Arrow Flight same-head, non-INT96 Parquet (isAdjustedToUTC=false), Python UDF/UDAF/UDTF interchange, memory scratch, nullable and nested array/map/struct SerDes, and TIMESTAMPTZ's distinct timezone-aware branch were traced and found symmetric. Forced INT96 is the distinct failing parallel path because it erases timezone metadata before Doris reads the value with the session timezone.
  • Tests and expected results: Added outputs are deterministic, ordered where needed, and consistent with the intended same-head wall-clock behavior. Coverage does not exercise mixed versions. Existing test_hive_read_parquet already covers explicit INT96 export/read-back and its wall-clock expectations would regress under this patch. M2 should remove only the terminal cleanup; the pre-setup drops already make reruns deterministic.
  • Observability: No additional logs or metrics are needed for this local conversion change once correctness and compatibility are fixed.
  • Transactions, persistence, data writes, and FE/BE variables: No transaction, EditLog, storage-format persistence, data-write atomicity, or new FE-to-BE variable propagation is involved. Parquet output is affected at its serialization boundary as described in M3.
  • Error handling, memory safety, and performance: No new unchecked Status, exception-boundary, allocator, nullable-shape, memory-accounting, or hot-path performance issue was found.
  • Release note and documentation: The release note accurately describes the intended direct Arrow Flight/ADBC behavior, but the implementation must first avoid the two inline correctness regressions. No separate user documentation requirement was identified.
  • User focus: .code-review.ClGMH5/review_focus.txt contained no additional focus request; the whole PR was reviewed.

Validation was static, as required by the review runner; no local build or test was attempted. Clang Formatter, CheckStyle, and Linux compile checks passed when inspected. The macOS BE-UT job stopped before tests because the runner selected JDK 25 while the script requires JDK 17; Linux BE-UT was still running at submission time.

Comment thread be/src/format/arrow/arrow_row_batch.cpp Outdated
// See apache/doris#65741.
case TYPE_DATETIMEV2:
if (type->get_scale() > 3) {
*result = std::make_shared<arrow::TimestampType>(arrow::TimeUnit::MICRO);

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] Preserve Remote Doris compatibility with old readers

This changes the DATETIMEV2 wire encoding for every type=doris Flight query that returns that type. A head producer emits 2026-07-02 23:30:45.000000 as a timezone-empty DATETIMEV2(6) timestamp with raw value 1783035045000000; a pre-change Remote Doris reader always calls from_unixtime(..., +08:00) and returns 2026-07-03 07:30:45.000000. Old-to-new and same-version pairs work, but new-to-old silently changes data, and the Flight ticket carries no capability/version. Please negotiate the naive-DATETIMEV2 encoding (or retain the legacy encoding for old consumers) and add a mixed-version test before changing this shared schema.

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.

Thanks for the analysis. This is intentional, and we will not keep backward compatibility with the old encoding, because the old encoding is itself incorrect: DATETIME/DATETIMEV2 is a timezone-naive wall-clock type, so encoding it as a timezone-aware Arrow timestamp (which makes clients render a spurious +00:00 instant) is exactly the bug being fixed here.

A mixed-version type=doris federation is only a transient rolling-upgrade window. We intentionally do not add a capability/version handshake for it; once both sides are upgraded the value is correct, and we do not preserve the previous (buggy) behavior for old readers.

Comment thread be/src/format/arrow/arrow_row_batch.cpp Outdated
} else if (type->get_scale() > 0) {
*result = std::make_shared<arrow::TimestampType>(arrow::TimeUnit::MILLI);
} else {
*result = std::make_shared<arrow::TimestampType>(arrow::TimeUnit::SECOND);

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] Keep DATETIMEV2 correct when Parquet forces INT96

This shared branch also feeds VParquetTransformer, and Parquet OUTFILE defaults enable_int96_timestamps to true. In that mode Arrow serializes the raw timestamp integer directly to INT96 and the Parquet column has no isAdjustedToUTC marker. Head now writes DATETIMEV2(0) value 2026-07-02 01:36:22 as as-if-UTC 1782956182; Doris's INT96 readers then apply the +08 session timezone and return 09:36:22. Base wrote the +08-adjusted integer and round-tripped. Please preserve local DATETIME semantics for the forced-INT96 path (or scope the naive mapping away from it); the existing test_hive_read_parquet INT96 export/read-back expectations should remain unchanged.

select k, dt0, dt3, dt6 from `test_remote_doris_datetime_naive_tz_catalog`.`test_remote_doris_datetime_naive_tz_db`.`t` order by k
"""

sql """ DROP DATABASE IF EXISTS test_remote_doris_datetime_naive_tz_db """

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.

[P3] Keep the regression fixtures after the assertion

The suite already drops the database and catalog before setup. These final drops violate root AGENTS.md test standard 3, which requires leaving test objects in place for failure investigation. Please remove both post-test drops; the existing pre-setup cleanup already keeps reruns deterministic.

@hello-stephen

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

query5	4330	630	490	490
query6	470	219	210	210
query7	4855	607	322	322
query8	352	195	179	179
query9	8785	4066	4000	4000
query10	486	349	309	309
query11	5955	2373	2110	2110
query12	159	114	125	114
query13	1266	624	443	443
query14	6251	5171	4867	4867
query14_1	4206	4212	4224	4212
query15	215	207	173	173
query16	1002	478	431	431
query17	1095	710	558	558
query18	2460	477	340	340
query19	213	188	147	147
query20	109	107	109	107
query21	237	159	135	135
query22	13566	13563	13440	13440
query23	17267	16445	16114	16114
query23_1	16211	16265	16447	16265
query24	7371	1750	1300	1300
query24_1	1331	1307	1281	1281
query25	587	470	399	399
query26	1338	370	238	238
query27	2553	633	397	397
query28	4519	2004	2005	2004
query29	1136	634	488	488
query30	347	268	227	227
query31	1124	1101	987	987
query32	115	66	98	66
query33	509	329	246	246
query34	1147	1160	654	654
query35	779	801	667	667
query36	1201	1175	1066	1066
query37	155	107	92	92
query38	1921	1704	1674	1674
query39	871	861	858	858
query39_1	836	819	860	819
query40	243	164	138	138
query41	65	62	63	62
query42	94	88	94	88
query43	319	323	276	276
query44	1452	774	752	752
query45	201	182	174	174
query46	1072	1161	726	726
query47	2165	2128	2031	2031
query48	403	399	295	295
query49	572	417	315	315
query50	1102	424	329	329
query51	10893	10863	10722	10722
query52	86	85	75	75
query53	245	288	197	197
query54	290	250	233	233
query55	75	71	64	64
query56	319	305	291	291
query57	1307	1280	1182	1182
query58	279	260	267	260
query59	1563	1658	1399	1399
query60	304	282	269	269
query61	160	149	151	149
query62	549	499	428	428
query63	244	199	206	199
query64	2856	1057	986	986
query65	4659	4666	4664	4664
query66	1847	526	406	406
query67	29351	29328	29191	29191
query68	3193	1503	920	920
query69	424	301	284	284
query70	1046	913	917	913
query71	406	351	322	322
query72	3390	2729	2377	2377
query73	850	765	428	428
query74	5048	4924	4715	4715
query75	2513	2491	2146	2146
query76	2315	1166	758	758
query77	342	371	315	315
query78	11787	11949	11304	11304
query79	1530	1145	757	757
query80	1313	554	479	479
query81	525	327	289	289
query82	636	153	121	121
query83	377	326	296	296
query84	280	164	128	128
query85	1028	613	507	507
query86	463	294	270	270
query87	1831	1812	1743	1743
query88	3688	2771	2755	2755
query89	429	378	336	336
query90	1850	200	195	195
query91	203	190	169	169
query92	60	59	54	54
query93	1679	1467	933	933
query94	823	353	317	317
query95	789	505	541	505
query96	1054	809	341	341
query97	2625	2631	2487	2487
query98	215	207	207	207
query99	1098	1104	970	970
Total cold run time: 264340 ms
Total hot run time: 177777 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 5c95ff786d415602c1b00ff45183587179c197b6, data reload: false

query1	0.01	0.01	0.00
query2	0.09	0.05	0.05
query3	0.26	0.14	0.14
query4	1.60	0.14	0.14
query5	0.24	0.22	0.22
query6	1.23	1.07	1.04
query7	0.05	0.01	0.01
query8	0.06	0.04	0.04
query9	0.38	0.30	0.33
query10	0.55	0.56	0.55
query11	0.18	0.13	0.14
query12	0.18	0.14	0.15
query13	0.46	0.48	0.49
query14	1.03	1.01	1.00
query15	0.62	0.60	0.60
query16	0.32	0.32	0.32
query17	1.10	1.15	1.09
query18	0.23	0.21	0.20
query19	2.08	1.99	2.02
query20	0.02	0.01	0.01
query21	15.44	0.23	0.13
query22	4.77	0.05	0.05
query23	16.11	0.31	0.12
query24	3.00	0.43	0.33
query25	0.12	0.05	0.05
query26	0.74	0.21	0.15
query27	0.04	0.03	0.04
query28	3.46	0.91	0.52
query29	12.54	4.18	3.33
query30	0.28	0.16	0.16
query31	2.77	0.59	0.32
query32	3.23	0.58	0.48
query33	3.15	3.20	3.19
query34	15.54	4.25	3.56
query35	3.51	3.48	3.51
query36	0.57	0.45	0.46
query37	0.09	0.06	0.06
query38	0.06	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.16	0.16
query41	0.09	0.04	0.03
query42	0.04	0.03	0.03
query43	0.05	0.03	0.03
Total cold run time: 96.51 s
Total hot run time: 25.18 s

@morningman
morningman force-pushed the fix-adbc-datetime-timezone branch from 5c95ff7 to 4203f0d Compare July 18, 2026 07:03
@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17721	4254	4210	4210
q2	2038	324	198	198
q3	10328	1414	842	842
q4	4683	478	344	344
q5	7605	845	575	575
q6	182	175	142	142
q7	754	827	622	622
q8	9686	1583	1658	1583
q9	5929	4366	4327	4327
q10	6853	1759	1472	1472
q11	509	365	323	323
q12	762	587	470	470
q13	18102	3462	2760	2760
q14	278	261	247	247
q15	q16	791	783	709	709
q17	1234	1120	959	959
q18	6792	5771	5550	5550
q19	1473	1393	1110	1110
q20	794	693	608	608
q21	5950	2626	2439	2439
q22	441	356	299	299
Total cold run time: 102905 ms
Total hot run time: 29789 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4571	4473	4519	4473
q2	303	322	214	214
q3	4592	4960	4451	4451
q4	2117	2178	1363	1363
q5	4408	4275	4295	4275
q6	225	178	130	130
q7	2313	1892	1627	1627
q8	2521	2157	2095	2095
q9	7955	7847	7912	7847
q10	4697	4695	4190	4190
q11	809	433	394	394
q12	752	777	554	554
q13	3291	3697	2876	2876
q14	285	310	297	297
q15	q16	731	738	657	657
q17	1432	1384	1398	1384
q18	8078	7344	7035	7035
q19	1108	1064	1085	1064
q20	2233	2216	1943	1943
q21	5327	4620	4474	4474
q22	535	466	421	421
Total cold run time: 58283 ms
Total hot run time: 51764 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 178741 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 4203f0de26a72171739e4582473703c5b82fe619, data reload: false

query5	4314	630	486	486
query6	477	230	234	230
query7	4865	560	337	337
query8	348	190	200	190
query9	8751	4127	4105	4105
query10	461	346	303	303
query11	5788	2329	2139	2139
query12	155	109	100	100
query13	1252	609	412	412
query14	6229	5240	4905	4905
query14_1	4256	4278	4272	4272
query15	214	207	177	177
query16	998	463	471	463
query17	966	728	578	578
query18	2450	479	353	353
query19	212	204	154	154
query20	114	112	107	107
query21	238	163	137	137
query22	13672	13795	13446	13446
query23	17366	16402	16150	16150
query23_1	16297	16345	16292	16292
query24	7752	1756	1287	1287
query24_1	1310	1330	1308	1308
query25	589	460	406	406
query26	1332	364	212	212
query27	2596	606	388	388
query28	4458	2004	2002	2002
query29	1110	639	483	483
query30	347	270	230	230
query31	1130	1096	990	990
query32	110	64	64	64
query33	565	332	254	254
query34	1175	1161	677	677
query35	780	777	660	660
query36	1161	1175	1032	1032
query37	158	117	97	97
query38	1911	1722	1684	1684
query39	877	882	859	859
query39_1	831	841	829	829
query40	258	173	147	147
query41	75	69	70	69
query42	95	93	95	93
query43	341	335	293	293
query44	1487	776	771	771
query45	197	195	173	173
query46	1068	1227	724	724
query47	2085	2107	1981	1981
query48	403	400	299	299
query49	584	424	325	325
query50	1144	451	330	330
query51	10600	10712	10696	10696
query52	87	93	75	75
query53	268	288	210	210
query54	301	259	235	235
query55	78	75	73	73
query56	319	319	305	305
query57	1326	1274	1213	1213
query58	301	306	269	269
query59	1601	1650	1399	1399
query60	300	275	265	265
query61	155	156	149	149
query62	549	495	427	427
query63	239	201	204	201
query64	2814	1056	882	882
query65	4651	4623	4662	4623
query66	1842	502	381	381
query67	29421	29188	29009	29009
query68	2997	1524	985	985
query69	397	304	258	258
query70	1087	986	975	975
query71	359	359	330	330
query72	2991	2725	2482	2482
query73	861	770	448	448
query74	5090	4968	4722	4722
query75	2522	2502	2143	2143
query76	2337	1154	785	785
query77	361	382	281	281
query78	11855	12047	11404	11404
query79	2399	1159	711	711
query80	1735	550	489	489
query81	524	342	294	294
query82	627	155	120	120
query83	379	329	311	311
query84	334	161	131	131
query85	956	616	519	519
query86	429	298	273	273
query87	1837	1817	1749	1749
query88	3753	2804	2781	2781
query89	444	375	342	342
query90	1925	198	202	198
query91	199	194	165	165
query92	64	60	58	58
query93	1747	1569	971	971
query94	752	369	307	307
query95	798	507	495	495
query96	1028	828	359	359
query97	2641	2625	2505	2505
query98	216	206	241	206
query99	1126	1118	973	973
Total cold run time: 265407 ms
Total hot run time: 178741 ms

@hello-stephen

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

query1	0.00	0.01	0.00
query2	0.11	0.06	0.06
query3	0.27	0.16	0.14
query4	1.62	0.15	0.15
query5	0.25	0.23	0.23
query6	1.24	1.09	1.11
query7	0.05	0.01	0.01
query8	0.06	0.04	0.04
query9	0.39	0.32	0.34
query10	0.55	0.57	0.54
query11	0.20	0.15	0.14
query12	0.20	0.14	0.15
query13	0.48	0.48	0.49
query14	1.03	1.03	1.00
query15	0.63	0.62	0.61
query16	0.32	0.34	0.31
query17	1.07	1.08	1.11
query18	0.23	0.22	0.21
query19	2.02	1.97	2.06
query20	0.02	0.01	0.01
query21	15.44	0.19	0.13
query22	4.99	0.05	0.06
query23	16.15	0.32	0.13
query24	2.94	0.44	0.33
query25	0.12	0.05	0.04
query26	0.76	0.21	0.15
query27	0.04	0.04	0.04
query28	3.49	0.98	0.56
query29	12.50	4.13	3.29
query30	0.30	0.18	0.18
query31	2.78	0.58	0.32
query32	3.22	0.61	0.50
query33	3.23	3.22	3.21
query34	15.70	4.28	3.48
query35	3.51	3.51	3.57
query36	0.55	0.44	0.43
query37	0.09	0.07	0.07
query38	0.05	0.05	0.04
query39	0.04	0.04	0.03
query40	0.18	0.18	0.14
query41	0.09	0.03	0.04
query42	0.04	0.03	0.04
query43	0.05	0.04	0.04
Total cold run time: 97 s
Total hot run time: 25.26 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 90.48% (19/21) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 57.42% (23927/41670)
Line Coverage 41.17% (235364/571706)
Region Coverage 36.96% (185805/502694)
Branch Coverage 38.15% (83419/218646)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (21/21) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.00% (30499/40667)
Line Coverage 59.08% (335899/568510)
Region Coverage 55.74% (281418/504848)
Branch Coverage 57.02% (124839/218934)

…mezone-naive Arrow timestamp

DATETIME / DATETIMEV2 is a timezone-naive wall-clock type, but over Arrow Flight
/ ADBC it was mapped to a timezone-aware Arrow timestamp built from the session
timezone, so ADBC/pyarrow clients rendered a spurious UTC offset, e.g.

  SELECT CAST('2026-07-02 01:36:22.069504' AS DATETIME(6))
  -> 2026-07-02 01:36:22.069504+00:00   (wrong; should be timezone-naive)

Mapping DATETIMEV2 to a timezone-naive Arrow timestamp fixes this for pyarrow.
But it changes the wire encoding for consumers that treat the value as an instant
(java.sql.Timestamp via JDBC getObject, or the Flink connector), which shifts the
wall clock on a non-UTC client. To avoid breaking those consumers, the new
behavior is gated behind a session variable, off by default:

- New session variable enable_arrow_flight_datetime_naive (default false),
  plumbed via TQueryOptions to the BE result sink. When on,
  get_arrow_schema_from_expr_ctxs maps DATETIMEV2 to a timezone-naive Arrow
  timestamp; when off, the previous timezone-aware mapping is kept. TIMESTAMPTZ
  always keeps its timezone, and other Arrow paths (Parquet export, Python UDF)
  are unchanged.
- DataTypeDateTimeV2SerDe::read_column_from_arrow interprets a timezone-naive
  Arrow timestamp as UTC (mirroring the write side), so a cross-cluster
  (type=doris) read stays correct for both encodings.

Tests: BE unit tests asserting the Arrow field timezone for both switch states;
regression cases in arrow_flight_sql_p0 (default and switched-on) and
external_table_p0/remote_doris.
@morningman
morningman force-pushed the fix-adbc-datetime-timezone branch from 4203f0d to 7ec9e8a Compare July 19, 2026 03:41
@morningman

Copy link
Copy Markdown
Contributor Author

/review

@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.62% (1908/2458)
Line Coverage 64.48% (34150/52966)
Region Coverage 64.90% (17571/27076)
Branch Coverage 54.05% (9417/17424)

@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: four correctness/compatibility defects and two material coverage gaps remain.

Critical checkpoint conclusions:

  • Data correctness: blocked. The aware read branch ignores Arrow's advertised timezone, the new naive round-trip corrupts supported fractional timestamps before 1970, and reachable legacy DATETIME values do not implement the advertised timestamp wire type.
  • Compatibility and FE-BE parameter passing: the variable is forwarded and reaches both all-new sink modes, but mixed-version result BEs can emit unequal schemas and fail a default-parallel query. This is distinct from the already-discussed cross-cluster old-reader behavior.
  • Configuration, persistence, and error handling: the default-off session definition and Thrift serialization are internally consistent; no additional persistence or validation defect was found. The unresolved mixed-schema behavior is not negotiated or rejected before execution.
  • Concurrency, lifecycle, ownership, and performance: no new defect found. Sender sharing and schema construction remain bounded to existing result-sink lifecycle, and recursive type mapping adds no material hot-path cost.
  • Tests: blocked. UTC CI can skip the only direct wire distinction, the serial sink is not covered, the Remote Doris suite never enables naive mode on its separate producer session, and no legacy DATETIME case fixes the public contract. Determined regression expectations should also follow the repository's generated qt/.out convention.
  • Scope and external callers: current-head default arguments preserve Parquet/Python callers, TIMESTAMPTZ remains aware, and nested mappings propagate the option. The existing Parquet INT96 and fixture-cleanup threads were not duplicated.
  • Observability and documentation: no new logging/profile regression was found. The author already marks documentation as required; the session-variable documentation remains to be tracked before merge. No additional user review focus was supplied.

Validation was static only because the review contract forbids builds. Formatting/checkstyle are green. The macOS BE-UT failure is a runner JDK-version setup failure rather than code evidence; the main Doris compile/UT jobs were still pending at review time.

// stores its value as an as-if-UTC epoch, so it must be read back with UTC.
// Interpreting it with the session timezone would shift the wall-clock value for
// cross-cluster (type=doris) reads. See apache/doris#65741.
const cctz::time_zone& real_ctz = type->timezone().empty() ? cctz::utc_time_zone() : ctz;

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] Decode aware timestamps in their advertised timezone

This branch still discards non-empty Arrow timezone metadata. A producer session in UTC writes 2026-07-02 01:36:22 as raw 1782956182 with tz=UTC, but both Remote Doris readers pass the hard-coded +08:00, so this selects ctz and materializes 09:36:22. This is distinct from the existing old-reader/naive compatibility thread: it reproduces with the default aware encoding and current code on both ends. Please resolve type->timezone() for the aware case and add a producer/reader-timezone mismatch test.

DateV2Value<DateTimeV2ValueType> v;
// convert second
v.from_unixtime(utc_epoch / divisor, ctz);
v.from_unixtime(utc_epoch / divisor, real_ctz);

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] Preserve negative epochs in the new naive round-trip

The new test only covers positive generated values. For valid DATETIMEV2(3) '1969-12-31 23:59:59.500', the naive writer emits signed -500, but the reader casts that to UInt64 before division and remainder, so it passes an enormous positive second count to from_unixtime and derives 116000 rather than 500000 microseconds. Keep the raw epoch signed with floor division/normalized remainder (or reuse the signed epoch-micros helper), and add fractional pre-1970 round-trip cases here.

// When true, DATETIME/DATETIMEV2 returned over Arrow Flight is mapped to a timezone-naive
// Arrow timestamp (carrying the wall-clock value); when false (default), the previous
// timezone-aware mapping is kept. See apache/doris#65741.
1005: optional bool enable_arrow_flight_datetime_naive = false

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] Gate naive schemas during rolling BE upgrades

Field 1005 is optional, so an old BE ignores true and keeps timestamp[..., tz=...], while a new BE emits timestamp[...]. With the default parallel result sink, FE registers an endpoint per result BE and FlightSqlConnectProcessor.fetchArrowFlightSchema() rejects schemas that are not exactly equal, so a query spanning old and new BEs fails before results can be fetched (and an all-old placement silently ignores the request). This is distinct from the existing cross-cluster Remote Doris thread. Please gate/negotiate the option across all scheduled result BEs, or reject it explicitly while the cluster is mixed-version.

// The switch changes the wire encoding. On a non-UTC client, the timezone-aware (off) and
// timezone-naive (on) values differ when read as java.sql.Timestamp via getObject(). This also
// confirms the SET actually took effect over Arrow Flight.
if (java.util.TimeZone.getDefault().getRawOffset() != 0) {

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] Make the end-to-end wire assertion deterministic

On a UTC JVM this block is skipped, while the unconditional getString() value is identical for aware and naive timestamps. The suite therefore still passes if SessionVariable.toThrift() or the parallel sink argument is removed. It also never sets enable_parallel_result_sink=false, so the serial sink branch is untested. Please inspect the returned Arrow field timezone (or force and restore a controlled non-UTC client timezone) and exercise both sink modes.

);
"""

qt_sql """

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] Enable naive mode in the producer session

This catalog query opens a separate authenticated Flight SQL session, and RemoteDorisScanNode injects only the parallel result-sink hint. Since the new variable defaults false, this assertion exercises only the pre-existing timezone-aware encoding; it can pass without the naive Remote Doris path that the suite comments claim to cover. Please arrange for the producer Flight query itself to enable enable_arrow_flight_datetime_naive=true and assert that round-trip (including the serial sink if it is supported).

case TYPE_DATETIMEV2:
case TYPE_TIMESTAMPTZ: {
const std::string empty_timezone;
const bool naive = type->get_primitive_type() == TYPE_DATETIMEV2 && datetime_naive;

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] Handle legacy DATETIME or narrow the option contract

The public SessionVariable/Thrift descriptions promise timezone-naive Arrow timestamps for both DATETIME and DATETIMEV2, but this condition only changes TYPE_DATETIMEV2; TYPE_DATETIME remains in the arrow::utf8() cases and its SerDe writes through StringBuilder. Explicit datetimev1 columns (and FE paths with date conversion disabled) therefore ignore the advertised wire-type behavior. Please either add matching timestamp schema/writer support for legacy DATETIME or narrow the contract to DATETIMEV2, with a legacy-type regression fixing the intended behavior.

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

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

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17662	4196	4235	4196
q2	2025	327	199	199
q3	10352	1424	838	838
q4	4681	468	341	341
q5	7544	894	578	578
q6	193	181	141	141
q7	779	815	610	610
q8	9339	1555	1722	1555
q9	5647	4399	4421	4399
q10	6754	1739	1486	1486
q11	507	361	321	321
q12	740	594	464	464
q13	18147	3377	2699	2699
q14	269	271	242	242
q15	q16	794	777	710	710
q17	1040	1012	1023	1012
q18	7203	5948	5643	5643
q19	1168	1224	1081	1081
q20	791	690	567	567
q21	5749	2646	2520	2520
q22	432	359	311	311
Total cold run time: 101816 ms
Total hot run time: 29913 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4492	4474	4504	4474
q2	293	343	232	232
q3	4618	4969	4437	4437
q4	2081	2172	1372	1372
q5	4426	4312	4411	4312
q6	240	178	131	131
q7	2063	2108	1711	1711
q8	2652	2260	2375	2260
q9	8176	8165	7897	7897
q10	4673	4659	4224	4224
q11	611	454	421	421
q12	755	765	555	555
q13	3270	3609	2888	2888
q14	290	297	274	274
q15	q16	725	760	657	657
q17	1401	1412	1540	1412
q18	8168	7737	7249	7249
q19	1150	1089	1083	1083
q20	2219	2206	1936	1936
q21	5252	4680	4459	4459
q22	525	458	406	406
Total cold run time: 58080 ms
Total hot run time: 52390 ms

@hello-stephen

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

query5	4329	619	490	490
query6	467	232	200	200
query7	4890	609	344	344
query8	348	193	169	169
query9	8785	4172	4151	4151
query10	507	350	327	327
query11	5845	2345	2121	2121
query12	153	107	101	101
query13	1323	647	441	441
query14	6213	5225	4891	4891
query14_1	4254	4252	4228	4228
query15	229	206	180	180
query16	1004	488	486	486
query17	1150	735	619	619
query18	2524	476	354	354
query19	212	192	165	165
query20	118	109	110	109
query21	232	165	135	135
query22	13570	13484	13376	13376
query23	17452	16546	16183	16183
query23_1	16328	16391	16334	16334
query24	7576	1786	1282	1282
query24_1	1301	1318	1272	1272
query25	588	469	399	399
query26	1355	354	208	208
query27	2602	586	383	383
query28	4486	1992	1986	1986
query29	1089	638	500	500
query30	341	262	230	230
query31	1141	1089	992	992
query32	114	63	62	62
query33	537	335	262	262
query34	1173	1125	641	641
query35	769	800	693	693
query36	1205	1185	1086	1086
query37	157	111	100	100
query38	1914	1698	1663	1663
query39	871	868	839	839
query39_1	822	823	839	823
query40	251	167	159	159
query41	68	63	69	63
query42	95	92	95	92
query43	327	331	284	284
query44	1424	768	764	764
query45	193	183	173	173
query46	1077	1240	726	726
query47	2156	2083	1979	1979
query48	408	413	259	259
query49	574	422	309	309
query50	1079	457	357	357
query51	11054	10922	10794	10794
query52	87	88	76	76
query53	260	277	208	208
query54	283	231	213	213
query55	76	71	67	67
query56	303	294	313	294
query57	1316	1302	1209	1209
query58	295	276	242	242
query59	1555	1651	1509	1509
query60	295	270	254	254
query61	154	162	148	148
query62	550	501	439	439
query63	252	208	200	200
query64	2834	1073	840	840
query65	4627	4602	4628	4602
query66	1896	507	387	387
query67	29277	29344	28487	28487
query68	3133	1529	996	996
query69	419	306	266	266
query70	1074	954	976	954
query71	379	340	335	335
query72	3045	2669	2347	2347
query73	892	803	437	437
query74	5072	4918	4723	4723
query75	2552	2508	2135	2135
query76	2366	1194	788	788
query77	356	385	286	286
query78	11824	11921	11362	11362
query79	1400	1117	727	727
query80	1262	544	483	483
query81	525	339	292	292
query82	578	161	121	121
query83	372	326	306	306
query84	293	158	132	132
query85	975	627	547	547
query86	427	293	268	268
query87	1823	1850	1735	1735
query88	3748	2847	2774	2774
query89	453	396	326	326
query90	1917	193	198	193
query91	204	191	164	164
query92	67	57	59	57
query93	1575	1484	978	978
query94	728	374	311	311
query95	795	501	581	501
query96	1041	843	358	358
query97	2640	2629	2514	2514
query98	223	207	203	203
query99	1087	1125	987	987
Total cold run time: 264354 ms
Total hot run time: 177687 ms

@hello-stephen

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

query1	0.01	0.01	0.01
query2	0.10	0.05	0.05
query3	0.27	0.13	0.14
query4	1.62	0.14	0.14
query5	0.24	0.22	0.22
query6	1.26	1.08	1.08
query7	0.04	0.01	0.01
query8	0.05	0.04	0.04
query9	0.39	0.33	0.31
query10	0.54	0.58	0.57
query11	0.19	0.14	0.14
query12	0.19	0.14	0.14
query13	0.49	0.47	0.49
query14	1.03	1.01	1.00
query15	0.62	0.59	0.60
query16	0.36	0.32	0.31
query17	1.10	1.08	1.07
query18	0.22	0.22	0.21
query19	2.08	1.95	1.97
query20	0.02	0.01	0.01
query21	15.44	0.20	0.14
query22	4.87	0.06	0.05
query23	16.14	0.31	0.13
query24	3.00	0.44	0.33
query25	0.11	0.06	0.04
query26	0.72	0.21	0.16
query27	0.04	0.04	0.04
query28	3.53	0.92	0.54
query29	12.54	4.24	3.38
query30	0.29	0.16	0.17
query31	2.78	0.58	0.30
query32	3.22	0.59	0.48
query33	3.10	3.32	3.28
query34	15.54	4.23	3.55
query35	3.54	3.51	3.56
query36	0.56	0.43	0.44
query37	0.09	0.07	0.06
query38	0.05	0.04	0.03
query39	0.04	0.04	0.03
query40	0.17	0.18	0.15
query41	0.08	0.02	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.04
Total cold run time: 96.75 s
Total hot run time: 25.33 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 89.29% (25/28) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.94% (30476/40666)
Line Coverage 59.08% (335903/568511)
Region Coverage 55.83% (281846/504847)
Branch Coverage 57.13% (125082/218934)

…TETIMEV2 Arrow read

Address the /review findings on apache#65780:

- BE read side (data_type_datetimev2_serde): keep the Arrow epoch signed and
  floor the sub-second remainder so pre-1970 DATETIMEV2 values round-trip
  through the naive encoding. A prior static_cast<UInt64> mangled negatives
  (e.g. datetime(3) '1969-12-31 23:59:59.500' decoded as '.116000' plus a
  garbage date). This fixes both the naive and the default aware path.

- type=doris federation readers: decode a timezone-aware Arrow timestamp in its
  own advertised timezone via a shared resolve_arrow_reader_timezone() helper,
  instead of the hard-coded +08:00 default, so a remote wall-clock round-trips
  when producer/consumer session timezones differ. Scoped to the two federation
  readers to avoid changing Paimon / arrow-ingest / Python UDF semantics, which
  share read_column_from_arrow.

- Narrow the session-variable / thrift contract wording to DATETIMEV2 (legacy
  DATETIME v1 is already returned as a string and is unaffected).

- Tests: add pre-1970 naive round-trip (DateTimeV2NaivePre1970RoundTrip) and
  aware-timezone resolution (ResolvesAwareArrowTimestampTimezone) BE unit tests;
  exercise both result-sink modes in the arrow-flight suite; correct the
  overclaiming federation-suite comment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.62% (1908/2458)
Line Coverage 64.48% (34150/52966)
Region Coverage 64.91% (17575/27076)
Branch Coverage 54.06% (9419/17424)

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17733	4139	4118	4118
q2	2013	312	201	201
q3	10849	1408	818	818
q4	4734	474	338	338
q5	8136	841	569	569
q6	305	167	137	137
q7	795	814	612	612
q8	10615	1697	1615	1615
q9	5793	4381	4404	4381
q10	6803	1724	1484	1484
q11	502	344	316	316
q12	715	576	454	454
q13	18156	3372	2772	2772
q14	261	261	244	244
q15	q16	788	777	714	714
q17	1139	947	928	928
q18	6900	5698	5516	5516
q19	1655	1213	1117	1117
q20	805	660	588	588
q21	6002	2537	2379	2379
q22	435	353	295	295
Total cold run time: 105134 ms
Total hot run time: 29596 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4484	4417	4424	4417
q2	280	321	214	214
q3	4594	4996	4400	4400
q4	2383	2170	1371	1371
q5	4418	4350	4665	4350
q6	249	196	149	149
q7	2051	1918	1843	1843
q8	2466	2249	2175	2175
q9	7916	7812	7819	7812
q10	4678	4808	4225	4225
q11	586	459	420	420
q12	790	792	563	563
q13	3344	3694	2975	2975
q14	306	312	279	279
q15	q16	749	714	649	649
q17	1363	1357	1315	1315
q18	7946	7042	6890	6890
q19	1132	1071	1077	1071
q20	2228	2225	1971	1971
q21	5295	4665	4460	4460
q22	521	463	412	412
Total cold run time: 57779 ms
Total hot run time: 51961 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 177731 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 7026d0f2fb4365fa039aeffdb776ff0e0451d94e, data reload: false

query5	4333	624	483	483
query6	477	233	225	225
query7	4895	582	335	335
query8	337	187	179	179
query9	8789	4067	4031	4031
query10	468	358	323	323
query11	5930	2309	2113	2113
query12	156	101	103	101
query13	1301	629	476	476
query14	6579	5175	4840	4840
query14_1	4191	4226	4181	4181
query15	208	205	173	173
query16	1035	460	452	452
query17	1104	684	567	567
query18	2603	449	346	346
query19	201	196	153	153
query20	118	108	104	104
query21	228	156	132	132
query22	13663	13795	13335	13335
query23	17137	16364	16101	16101
query23_1	16210	16193	16227	16193
query24	7585	1769	1287	1287
query24_1	1268	1303	1297	1297
query25	572	463	387	387
query26	1348	354	214	214
query27	2556	595	388	388
query28	4494	2006	1980	1980
query29	1111	626	505	505
query30	342	264	231	231
query31	1128	1090	980	980
query32	121	63	64	63
query33	540	326	253	253
query34	1188	1133	656	656
query35	771	795	662	662
query36	1214	1180	1086	1086
query37	156	109	91	91
query38	1883	1731	1635	1635
query39	881	865	863	863
query39_1	824	856	851	851
query40	247	168	142	142
query41	70	67	67	67
query42	93	93	91	91
query43	318	319	294	294
query44	1414	775	755	755
query45	198	187	175	175
query46	1073	1240	746	746
query47	2172	2143	1999	1999
query48	398	436	303	303
query49	598	416	314	314
query50	1100	442	352	352
query51	10853	10818	10861	10818
query52	86	91	77	77
query53	260	281	212	212
query54	297	256	227	227
query55	78	72	67	67
query56	317	297	319	297
query57	1318	1303	1219	1219
query58	308	285	259	259
query59	1607	1662	1421	1421
query60	312	279	272	272
query61	180	166	169	166
query62	554	542	437	437
query63	243	195	204	195
query64	2826	1055	858	858
query65	4705	4595	4609	4595
query66	1817	522	395	395
query67	29425	29380	29191	29191
query68	3104	1542	966	966
query69	419	292	270	270
query70	1092	963	949	949
query71	377	335	306	306
query72	3049	2744	2356	2356
query73	853	821	431	431
query74	5068	4915	4703	4703
query75	2515	2507	2117	2117
query76	2348	1156	737	737
query77	347	361	282	282
query78	11907	11944	11248	11248
query79	1469	1200	727	727
query80	1280	536	480	480
query81	528	333	283	283
query82	682	162	118	118
query83	368	318	288	288
query84	273	158	130	130
query85	986	655	539	539
query86	419	294	289	289
query87	1826	1830	1737	1737
query88	3685	2799	2770	2770
query89	446	380	324	324
query90	1957	192	190	190
query91	204	197	163	163
query92	62	61	56	56
query93	1756	1551	922	922
query94	717	339	318	318
query95	796	612	460	460
query96	1125	782	358	358
query97	2643	2627	2469	2469
query98	213	205	199	199
query99	1086	1122	975	975
Total cold run time: 264764 ms
Total hot run time: 177731 ms

@hello-stephen

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

query1	0.00	0.00	0.01
query2	0.13	0.08	0.08
query3	0.36	0.24	0.25
query4	1.61	0.25	0.25
query5	0.33	0.31	0.32
query6	1.15	0.67	0.68
query7	0.04	0.01	0.00
query8	0.09	0.06	0.06
query9	0.50	0.38	0.40
query10	0.60	0.60	0.61
query11	0.31	0.19	0.17
query12	0.31	0.18	0.18
query13	0.53	0.54	0.53
query14	0.93	0.92	0.93
query15	0.68	0.59	0.60
query16	0.39	0.40	0.39
query17	1.03	1.04	1.02
query18	0.31	0.31	0.29
query19	1.95	1.83	1.82
query20	0.02	0.02	0.01
query21	15.40	0.37	0.31
query22	4.93	0.15	0.14
query23	15.84	0.49	0.30
query24	2.47	0.60	0.41
query25	0.15	0.10	0.10
query26	0.74	0.26	0.22
query27	0.11	0.09	0.11
query28	3.44	0.93	0.52
query29	12.47	4.31	3.34
query30	0.37	0.26	0.25
query31	2.76	0.62	0.32
query32	3.24	0.61	0.47
query33	2.92	3.01	3.06
query34	15.67	4.05	3.38
query35	3.32	3.30	3.31
query36	0.65	0.54	0.51
query37	0.13	0.09	0.08
query38	0.08	0.07	0.07
query39	0.07	0.05	0.06
query40	0.19	0.18	0.17
query41	0.14	0.08	0.07
query42	0.08	0.06	0.07
query43	0.08	0.07	0.06
Total cold run time: 96.52 s
Total hot run time: 25.74 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] ArrowFlight SQL result automatically converts timezone naive date to UTC (which is wrong)

2 participants