[fix](outfile)Preserve DateTimeV2 scale in OUTFILE CSV.#64344
Open
hubgeter wants to merge 1 commit into
Open
Conversation
CSV OUTFILE serialization for DateTimeV2 was using the value-level default formatter, which emits six fractional digits whenever microseconds are present. The serializer already carries the declared DateTimeV2 scale, so pass it through and cover the local OUTFILE CSV path with a focused Groovy regression.
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
yiguolei
reviewed
Jun 10, 2026
| auto val = assert_cast<const ColumnDateTimeV2&, TypeCheckOnRelease::DISABLE>(*ptr).get_element( | ||
| row_num); | ||
| char buf[64]; | ||
| char* pos = val.to_string(buf); |
Contributor
There was a problem hiding this comment.
- 为什么是json,不是调用csv 相关的方法?
- core 目录下所有的改动,需要有单测?
- scale, decimal,datetimev1, timestamp 这些的scale都是咋处理的?
- csv 格式,parquet,arrow ,json,text,csv, scale 问题是否存在?
- 嵌套的时候, array 里面有一个datetimev2的时候,我们能否处理?
yiguolei
approved these changes
Jun 10, 2026
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
1 similar comment
Contributor
|
PR approved by anyone and no changes requested. |
Contributor
|
run buildall |
Contributor
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
TPC-H: Total hot run time: 29400 ms |
Contributor
TPC-DS: Total hot run time: 169785 ms |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Problem Summary:
CSV OUTFILE serialization for DateTimeV2 was using the value-level default formatter, which emits six fractional digits whenever microseconds are present. The serializer already carries the declared DateTimeV2 scale, so pass it through and cover the local OUTFILE CSV path with a focused Groovy regression.
example :
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)