Mryange opened a new pull request, #69611:
URL: https://github.com/apache/doris/pull/69611
### What problem does this PR solve?
Issue Number: N/A
Problem Summary:
Adding a TIMESTAMPTZ column with DEFAULT CURRENT_TIMESTAMP could finish
schema change but leave historical rows unreadable. Root cause: the backfill
default was materialized without timezone information, and the batch ADD COLUMN
and Protobuf paths did not consistently use the materialized value.
Materialize TIMESTAMPTZ backfill defaults as UTC literals, use the
schema-change conversion for batch ADD COLUMN, and preserve the default
expression in both Protobuf and Thrift. Partial updates evaluate the preserved
expression for new rows instead of reusing the fixed backfill timestamp.
### Release note
Fix unreadable historical TIMESTAMPTZ values after adding a column with
DEFAULT CURRENT_TIMESTAMP.
### Check List (For Author)
- Test:
- [x] Regression test: test_timestamptz_default_schema_change passed
with -forceGenOut and again normally (1 suite, 0 failures each).
- [ ] Unit Test: FE coverage added and compiled, not executed separately.
- BE ASAN and FE builds passed. C++ formatting checks passed. Clang-tidy
reported existing diagnostics outside modified lines; the full scan was not
clean.
- Behavior changed:
- [x] Yes. Historical rows receive readable TIMESTAMPTZ defaults;
subsequent writes retain dynamic CURRENT_TIMESTAMP evaluation.
- Does this need documentation?
- [x] No.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]