-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add FormatOptions to Config
#15793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add FormatOptions to Config
#15793
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
b683339
Add `FormatOptions` to Config
blaginin 93ddca0
Fix `output_with_header`
blaginin b4ce3f4
Add cli test
blaginin d1ae051
Add `to_string`
blaginin 7e3c6c2
Prettify
blaginin 29a8baf
Prettify
blaginin 3155694
Merge branch 'main' into format-params
blaginin ac9ad38
Preserve the initial `NULL` logic
blaginin 83448d1
Cleanup
blaginin 5d60883
Remove `lt` as no longer needed
blaginin 2b9d97c
Format assert
blaginin 1454ade
Fix sqllogictest
blaginin d54c9ca
Merge branch 'main' into format-params
blaginin 79bcb29
Fix tests
blaginin 666eabe
Set formatting params for dates / times
blaginin 54eeb14
Merge remote-tracking branch 'apache/main' into format-params
alamb 8374883
Lowercase `duration_format`
blaginin ca57a34
Merge remote-tracking branch 'origin/format-params' into format-params
blaginin d6ac3ff
Merge main
blaginin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
20 changes: 20 additions & 0 deletions
20
datafusion-cli/tests/snapshots/cli_quick_test@change_format_version.snap
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| --- | ||
| source: datafusion-cli/tests/cli_integration.rs | ||
| info: | ||
| program: datafusion-cli | ||
| args: | ||
| - "--file" | ||
| - tests/sql/types_format.sql | ||
| - "-q" | ||
| --- | ||
| success: true | ||
| exit_code: 0 | ||
| ----- stdout ----- | ||
| +-----------+ | ||
| | Int64(54) | | ||
| | Int64 | | ||
| +-----------+ | ||
| | 54 | | ||
| +-----------+ | ||
|
|
||
| ----- stderr ----- |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| set datafusion.format.types_info to true; | ||
|
|
||
| select 54 |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed to avoid confusion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @blaginin, this PR is really nice. I've made a quick look, and think that perhaps we should rename this config in even all places as "output format" ? Directly saying "datafusion.format" etc. could make people think something related with objects?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for checking this out! 🙏 I feel like "format" can be better than "output format" because: