Skip to content

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

Open
suxiaogang223 wants to merge 1 commit into
apache:branch-4.0from
suxiaogang223:codex/pick-61330-branch-4.0
Open

branch-4.0: [fix](hive) Fix Hive DATE timezone shift in external readers #61330#63896
suxiaogang223 wants to merge 1 commit into
apache:branch-4.0from
suxiaogang223:codex/pick-61330-branch-4.0

Conversation

@suxiaogang223
Copy link
Copy Markdown
Member

This picks #61330 to branch-4.0.

@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?

…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 force-pushed the codex/pick-61330-branch-4.0 branch from ad9b039 to cb259f9 Compare May 29, 2026 07:53
@suxiaogang223
Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (2/2) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.50% (25526/35699)
Line Coverage 54.36% (270475/497603)
Region Coverage 51.93% (224050/431462)
Branch Coverage 53.39% (96490/180713)

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.

2 participants