Skip to content

branch-4.1: [fix](hive) Fix Hive DATE timezone shift in external readers #61330#61722

Merged
yiguolei merged 1 commit intoapache:branch-4.1from
suxiaogang223:codex/pick-61330-branch-4.1
Mar 26, 2026
Merged

branch-4.1: [fix](hive) Fix Hive DATE timezone shift in external readers #61330#61722
yiguolei merged 1 commit intoapache:branch-4.1from
suxiaogang223:codex/pick-61330-branch-4.1

Conversation

@suxiaogang223
Copy link
Contributor

Cherry-pick #61330 to branch-4.1

What problem does this PR solve?

Fix Hive external table DATE columns being shifted by one day in west time zones when reading ORC/Parquet files.

This backport keeps DATE semantics time-zone-independent for Hive external ORC/Parquet reads and includes the matching unit and regression coverage from the merged master change.

Cherry-pick commit

…61330)

Hive external tables currently apply session time zone day offsets when
decoding ORC/Parquet DATE columns. In west time zones such as -06:00,
this shifts DATE values by one day earlier, while Spark keeps the
original logical date.

This PR removes the incorrect time zone day adjustment from Hive DATE
decoding paths in ORC and Parquet readers. TIMESTAMP-related time zone
handling is unchanged.

It also adds:
- BE unit coverage for west time zone DATE reads in ORC and Parquet
- Hive external regression coverage for UTC and -06:00 reads against the
same DATE data

Local BE build / regression execution was not run on this machine
because the current environment does not support BE compilation or
running those tests; pipeline validation is expected to cover execution.

Issue Number: N/A

Related PR: N/A

Problem Summary:
- Fix CIR-19660: Hive DATE columns read one day earlier in west time
zones
- Keep DATE semantics time-zone-independent for ORC/Parquet external
reads
- Add unit and regression coverage for UTC vs west time zone consistency

Fix Hive external table DATE columns being shifted by one day in west
time zones when reading ORC/Parquet files.

(cherry picked from commit 18e5dda)
@suxiaogang223 suxiaogang223 requested a review from yiguolei as a code owner March 25, 2026 09:32
@hello-stephen
Copy link
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?

@suxiaogang223
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 100.00% (2/2) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.85% (19591/37071)
Line Coverage 36.18% (182634/504731)
Region Coverage 32.51% (141160/434193)
Branch Coverage 33.72% (61959/183764)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (2/2) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.07% (25784/36279)
Line Coverage 53.83% (270758/503018)
Region Coverage 51.17% (224194/438164)
Branch Coverage 52.76% (97238/184290)

@yiguolei yiguolei merged commit c34b80a into apache:branch-4.1 Mar 26, 2026
26 of 27 checks passed
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.

4 participants