-
Notifications
You must be signed in to change notification settings - Fork 763
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
feat(query): timestamp type can modify output format with new setting TIMESTAMP_OUTPUT_FORMAT #14174
Conversation
85d55ef
to
8d8dff8
Compare
Maybe we can remove this impl in this pr? cc @andylokandy |
8d8dff8
to
13fef7f
Compare
13fef7f
to
2b20211
Compare
tests/sqllogictests/suites/base/05_ddl/05_0035_ddl_set_settings.test
Outdated
Show resolved
Hide resolved
Docker Image for PR
|
date/timestamp format should be part of file formats, not a setting.
|
…ing TIMESTAMP_OUTPUT_FORMAT
2b20211
to
38a75a4
Compare
|
yes, like sf, we should distinguish |
@youngsofun Yes, I think this is mainly for the third-party SaaS intergration. But now we can not say the superset side issue related to this timestamp format, @hantmac are still investigating. |
0197839
to
3b35938
Compare
tests/sqllogictests/suites/base/05_ddl/05_0035_ddl_set_settings.test
Outdated
Show resolved
Hide resolved
8a8f2a5
to
be80314
Compare
pub fn timestamp_to_string(ts: i64, tz: Tz) -> impl Display { | ||
ts.to_timestamp(tz).format(TIMESTAMP_FORMAT) | ||
pub fn timestamp_to_string(ts: i64, tz: Tz, ts_format: &str) -> impl Display + '_ { | ||
// 1. If write a wrong format, .format(ts_format) will display the ts_format directly. |
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.
To avoid uninitialized function context:
// 1. If write a wrong format, .format(ts_format) will display the ts_format directly. | |
debug_assert!(!ts_format.trim().is_empty()); | |
// 1. If write a wrong format, .format(ts_format) will display the ts_format directly. |
be80314
to
fda2875
Compare
Confirmed, there is no need add this setting, let's close this PR, thanks all. |
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
timestamp type can modify output format with new setting TIMESTAMP_OUTPUT_FORMAT
About new setting
Fixes #14169
Tests
Type of change
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)