Improve error messages with nicer formatting of Date and Time types#19954
Merged
timsaucer merged 12 commits intoapache:mainfrom Jan 24, 2026
Merged
Improve error messages with nicer formatting of Date and Time types#19954timsaucer merged 12 commits intoapache:mainfrom
timsaucer merged 12 commits intoapache:mainfrom
Conversation
Member
|
Looks great, just a few easy CI errors.LMK if you want me to knock them out. |
Contributor
Author
|
That would be appreciated ❤️ |
Contributor
Author
|
Btw, datafusion currently uses Maybe we want to follow arrow-rs here? (…in another PR) |
timsaucer
approved these changes
Jan 23, 2026
alamb
approved these changes
Jan 23, 2026
Contributor
alamb
left a comment
There was a problem hiding this comment.
Looks good to me too --thanks @emilk and @timsaucer
| SELECT | ||
| -- nanoseconds, with no, utc, and local timezone | ||
| arrow_cast(column1, 'Timestamp(Nanosecond, None)') as ts_nano_no_tz, | ||
| arrow_cast(column1, 'Timestamp(ns)') as ts_nano_no_tz, |
Contributor
There was a problem hiding this comment.
I think it is valuable to have at least a few tests that verify the old syntax still works, FWIW
| Projection: shapes.shape_id [shape_id:UInt32] | ||
| Unnest: lists[shape_id2|depth=1] structs[] [shape_id:UInt32, shape_id2:UInt32;N] | ||
| Aggregate: groupBy=[[shapes.shape_id]], aggr=[[array_agg(shapes.shape_id) AS shape_id2]] [shape_id:UInt32, shape_id2:List(Field { data_type: UInt32, nullable: true });N] | ||
| Aggregate: groupBy=[[shapes.shape_id]], aggr=[[array_agg(shapes.shape_id) AS shape_id2]] [shape_id:UInt32, shape_id2:List(UInt32);N] |
Jefffrey
approved these changes
Jan 24, 2026
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.
Displayformatting ofDataType:s in error messages #17565DisplayforDataTypeandFieldarrow-rs#8290Rationale for this change
I believe that error messages should be as readable as possible. Aim for
rustcmore thangcc.Displayis the nice, user-facing formatter.Debugis for… well, debugging.What changes are included in this PR?
Change a bunch of
{:?}format string to{}. I'm sure I missed a lot of them, because I know of no way to enforce this withoutdisallowed_methodson trait impls rust-lang/rust-clippy#8581Are these changes tested?
I assume CI runs
cargo test:)Are there any user-facing changes?
Yes! Error messages should be a bit more readable now.