Skip to content
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

Extend param substitution to handle datetimes #38695

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

snoe
Copy link
Contributor

@snoe snoe commented Feb 12, 2024

Fixes #38037
Fixes #33492

Prior to this only dates were supported as values for native timestamp field parameters. By properly aligning the temporal unit, we can ensure that native filters match gui filters.

Prior to this only dates were supported as values for native timestamp field parameters.
@snoe snoe added the .Team/QueryProcessor :hammer_and_wrench: label Feb 12, 2024
@snoe snoe requested a review from a team February 12, 2024 23:39
@snoe snoe self-assigned this Feb 12, 2024
@snoe snoe requested a review from camsaul as a code owner February 12, 2024 23:39
Copy link

replay-io bot commented Feb 12, 2024

Status Complete ↗︎
Commit 3605fa2
Results
⚠️ 1 Flaky
2312 Passed

Copy link
Contributor

@metamben metamben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one test is strange. Is there a GH issue for the problem this PR is fixing? If there is, we should include it,

@@ -93,7 +93,7 @@
(mt/with-clock #t "2018-07-01T12:30:00.000Z"
(mt/with-metadata-provider meta/metadata-provider
(let [field-filter (params/map->FieldFilter
{:field (lib.metadata/field (qp.store/metadata-provider) (meta/id :checkins :date))
{:field (lib.metadata/field (qp.store/metadata-provider) (meta/id :orders :created-at))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unexpected for me that the rest of the test doesn't need changing. Where does/should "PUBLIC"."CHECKINS" come from?

@snoe snoe added the backport Automatically create PR on current release branch on merge label Feb 15, 2024
@snoe snoe merged commit bb9f81d into master Feb 15, 2024
127 of 128 checks passed
@snoe snoe deleted the native-query-datetime-filtering branch February 15, 2024 17:10
Copy link

@snoe Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone?

github-actions bot pushed a commit that referenced this pull request Feb 15, 2024
* Extend param substitution to handle datetimes

Prior to this only dates were supported as values for native timestamp field parameters.

* Check for exclusion filter when determining alignment unit
metabase-bot bot added a commit that referenced this pull request Feb 15, 2024
* Extend param substitution to handle datetimes

Prior to this only dates were supported as values for native timestamp field parameters.

* Check for exclusion filter when determining alignment unit

Co-authored-by: Case Nelson <case@metabase.com>
@calherries
Copy link
Contributor

@metabase-bot backport release-x.48.x

@calherries
Copy link
Contributor

@snoe I'm backporting to 48 because it looks like this never hit the 48 branch.

Copy link

@calherries something went wrong while creating a backport [Logs]

calherries added a commit that referenced this pull request Feb 22, 2024
* Extend param substitution to handle datetimes

Prior to this only dates were supported as values for native timestamp field parameters.

* Check for exclusion filter when determining alignment unit

Co-authored-by: Case Nelson <case@metabase.com>
calherries added a commit that referenced this pull request Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Automatically create PR on current release branch on merge .Team/QueryProcessor :hammer_and_wrench:
Projects
None yet
3 participants