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

feat(cubesql): Allow filter by exact year #5367

Merged
merged 1 commit into from
Sep 28, 2022
Merged

Conversation

MazterQyou
Copy link
Member

@MazterQyou MazterQyou commented Sep 26, 2022

Check List

  • Tests has been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Description of Changes Made

This PR allows WHERE expressions to filter data from Cube queries by exact year with WHERE TRUNC(EXTRACT(YEAR FROM column)) = literal_year. Such queries are used by Tableau. It also adds a related test.

@MazterQyou MazterQyou requested a review from a team as a code owner September 26, 2022 14:35
@codecov
Copy link

codecov bot commented Sep 26, 2022

Codecov Report

Base: 60.15% // Head: 75.73% // Increases project coverage by +15.58% 🎉

Coverage data is based on head (d2c82e2) compared to base (b77f33b).
Patch coverage: 98.30% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5367       +/-   ##
===========================================
+ Coverage   60.15%   75.73%   +15.58%     
===========================================
  Files         140      275      +135     
  Lines       11684    33110    +21426     
  Branches     2853     2853               
===========================================
+ Hits         7028    25077    +18049     
- Misses       4368     7745     +3377     
  Partials      288      288               
Flag Coverage Δ
cube-backend 60.15% <ø> (ø)
cubesql 84.23% <98.30%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...besql/cubesql/src/compile/rewrite/rules/filters.rs 92.87% <97.43%> (ø)
rust/cubesql/cubesql/src/compile/mod.rs 90.62% <100.00%> (ø)
...e/engine/information_schema/postgres/pg_attrdef.rs 93.75% <0.00%> (ø)
...gine/information_schema/postgres/pg_description.rs 93.75% <0.00%> (ø)
.../engine/information_schema/postgres/pg_database.rs 97.46% <0.00%> (ø)
rust/cubesql/cubesql/src/sql/postgres/service.rs 70.21% <0.00%> (ø)
.../information_schema/postgres/role_column_grants.rs 96.49% <0.00%> (ø)
...esql/cubeclient/src/models/v1_cube_meta_segment.rs 0.00% <0.00%> (ø)
rust/cubesql/cubesql/src/compile/error.rs 54.16% <0.00%> (ø)
rust/cubesql/cubesql/src/transport/ctx.rs 91.66% <0.00%> (ø)
... and 127 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@ovr ovr left a comment

Choose a reason for hiding this comment

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

LGTM

@ovr ovr merged commit c31e59d into master Sep 28, 2022
@ovr ovr deleted the cubesql/where-extract-year branch September 28, 2022 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants