matanper opened a new pull request, #70749:
URL: https://github.com/apache/doris/pull/70749
### What problem does this PR solve?
Issue Number: close #69041
Related PR: #69668
Problem Summary:
Issue #69041 reported that Stream Load with `format=arrow` ignored the load's
`timezone` header: the legacy `ArrowStreamReader` resolved its cctz zone from
`TimezoneUtils::default_time_zone` (`+08:00`), so a `timestamp[us, tz=UTC]`
value of 2026-10-13 16:37:00 loaded with `timezone: UTC` was stored as
2026-10-14 00:37:00.
On master the code is already correct: #69668 moved Arrow loads to
FileScannerV2, whose Arrow reader converts with `_state->timezone_obj()`, and
#69723 removed the legacy reader. Nothing tests that the load's time zone
reaches the Arrow conversion, so a regression would go unnoticed. The fix for
branch-4.1, which still uses the legacy reader, is a separate PR.
This adds `test_arrow_stream_load_timezone`, which loads one Arrow IPC stream
(a `timestamp[us, tz=UTC]` column and a naive `timestamp[us]` column holding
2026-10-13 16:37:00 UTC, a pre-epoch fractional instant and a NULL) four
times:
- `timezone: UTC` stores the zoned value as 2026-10-13 16:37:00;
- `timezone: Asia/Shanghai` stores it as 2026-10-14 00:37:00;
- `time_zone: America/Los_Angeles` (the alternate header spelling) stores it
as 2026-10-13 09:37:00;
- without a header it is stored in the session time zone, checked against
`CONVERT_TZ(..., 'UTC', @@global.time_zone)` so the result does not depend
on
the cluster's setting.
The naive column keeps its wall-clock fields in every case.
### Release note
None
### Check List (For Author)
- Test: Regression test (`test_arrow_stream_load_timezone`, `.out` generated
with `-genOut` and re-verified on a master build)
- Behavior changed: No
- Does this need documentation: No
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]