Skip to content

Conversation

@ovr
Copy link
Member

@ovr ovr commented Oct 20, 2025

Allowing filters to be pushed down with DATE_PART('year', ?column) = ?year AND DATE_PART('quarter', ?column) = ?quarter by pushing it as inDateRange. Now, such queries will be accelerated with pre-aggregations.

I am re-using code that we have for tablea, but without usage of Trunc as wrapper. I've added ability to merge date range with quarter.

@github-actions github-actions bot added the rust Pull requests that update Rust code label Oct 20, 2025
@ovr ovr changed the title feat(cubesql): Filter push down for date_part('year') = ?y & date_par… feat(cubesql): Filter push down for date_part('year') & date_part('quarter') Oct 20, 2025
@ovr ovr changed the title feat(cubesql): Filter push down for date_part('year') & date_part('quarter') feat(cubesql): Filter push down for date_part(?upper) AND date_part(?lower) Oct 20, 2025
return false;
};

// Paranoid check, If the resulting range is outside of the original range, we can't merge
Copy link
Member Author

Choose a reason for hiding this comment

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

Someone can combine timestamp comparision and quarter. Let's add these check to protect such cases.

@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

❌ Patch coverage is 95.19231% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.25%. Comparing base (6034850) to head (d04c668).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
...besql/cubesql/src/compile/rewrite/rules/filters.rs 86.11% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #10070    +/-   ##
========================================
  Coverage   83.24%   83.25%            
========================================
  Files         244      244            
  Lines       73483    73589   +106     
========================================
+ Hits        61172    61267    +95     
- Misses      12311    12322    +11     
Flag Coverage Δ
cubesql 83.25% <95.19%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ovr ovr marked this pull request as ready for review October 20, 2025 19:41
@ovr ovr requested a review from a team as a code owner October 20, 2025 19:41
@ovr ovr requested a review from MazterQyou October 20, 2025 19:42
@ovr ovr merged commit bcadbf2 into master Oct 20, 2025
149 of 156 checks passed
@ovr ovr deleted the feat/cubesql-filter-pushdown-merge-year-quarter branch October 20, 2025 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants