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
QP local date filtering and formatting overhaul #40416
Open
camsaul
wants to merge
20
commits into
master
Choose a base branch
from
fix-39769
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
camsaul
added
the
backport
Automatically create PR on current release branch on merge
label
Mar 21, 2024
|
camsaul
changed the title
QP local date filtering overhaul
QP local date filtering and formatting overhaul
Mar 21, 2024
camsaul
added
no-backport
Do not backport this PR to any branch
backport
Automatically create PR on current release branch on merge
and removed
backport
Automatically create PR on current release branch on merge
no-backport
Do not backport this PR to any branch
labels
Mar 21, 2024
I'm not sure if this is going to be backportable or not, there are a lot of changes in here. |
camsaul
added
no-backport
Do not backport this PR to any branch
and removed
backport
Automatically create PR on current release branch on merge
labels
Mar 22, 2024
bshepherdson
approved these changes
Apr 5, 2024
test/metabase/query_processor_test/date_time_zone_functions_test.clj
Outdated
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Stop doing dumb things with local dates that give you unexpected results.
Format
LocalDate
s in QP results as dates rather than (offset) date timesInstead of returning them as
"2024-03-20T00:00:00-07:00"
, return them as"2024-03-20"
.Also, format
LocalDateTime
as a local date time,LocalTime
as a local time, etc. (don't add offsets to things that never had them in the first place)Bucketing on a date extraction bucket --
:day
,:month
,:week
,:quarter
, or:year
-- should now return aLocalDate
, rather than anOffsetDateTime
. This was needed to fix the underlying issues we were running into. The FE code actually does the right thing either way, but drivers using our test suite are going to need some updates for tests to pass.Honestly this is the way we should have been doing things all along.
Fixes #20333
(actually this might already be fixed, need to verify)
Might fix some other bugs like