Skip to content

Conversation

@waralexrom
Copy link
Member

Check List

  • Tests have 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

@waralexrom waralexrom requested a review from a team as a code owner June 11, 2025 15:56
@codecov
Copy link

codecov bot commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.17%. Comparing base (aae3b05) to head (c17bcbb).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9673   +/-   ##
=======================================
  Coverage   84.17%   84.17%           
=======================================
  Files         230      230           
  Lines       85112    85112           
=======================================
  Hits        71647    71647           
  Misses      13465    13465           
Flag Coverage Δ
cubesql 84.17% <ø> (ø)

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.

let query = SimpleQuery {
schema,
filter: logical_filter,
offset: self.query_properties.offset(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch there. I noticed the offset is still present here and wanted to share some thoughts (though I'm still familiarizing myself with the codebase, so please correct me if I'm missing something).

From what I understand, there might be a few considerations regarding offset in subqueries:

  1. Database compatibility: Different databases have varying requirements for offset usage:
    MSSQL requires an ORDER BY clause when using OFFSET
    MySQL requires OFFSET to be paired with a LIMIT clause
  2. Pagination concerns: I'm wondering if pagination logic should be restricted to the outer query only? My understanding is that applying pagination to inner queries could potentially lead to data inconsistencies, especially when the API request includes result pagination.

Would it make sense to remove the offset from this subquery as well? I'd appreciate your thoughts on this, as you likely have more context about the intended behavior here.

Copy link
Member Author

Choose a reason for hiding this comment

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

@UsmanYasin Thank you so much for catching that! The offset really isn’t needed here — that was my mistake, and I’ve removed it.
More broadly, I think this part could use a small refactor to prevent both limit and offset from being set at all in this context. I’ve been thinking about that, and as I find time, I plan to gradually refactor things to (hopefully) improve the architecture and overall clarity.

@waralexrom waralexrom requested a review from KSDaemon June 12, 2025 15:53
Copy link
Member

@KSDaemon KSDaemon left a comment

Choose a reason for hiding this comment

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

👍🏻 LGTM

Comment on lines +3284 to +3286
if (getEnv('nativeSqlPlanner')) {
return;
}
Copy link
Member

Choose a reason for hiding this comment

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

Can you move this to the upper scope and mark test(s) as skipped instead of making it pass while it does nothing?

} else {
false
}
pub fn can_used_as_addictive_in_multplied(&self) -> bool {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pub fn can_used_as_addictive_in_multplied(&self) -> bool {
pub fn can_be_used_as_additive_in_multplied(&self) -> bool {

Copy link
Member

Choose a reason for hiding this comment

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

Measures are not about drugs :)

}
pub fn can_used_as_addictive_in_multplied(&self) -> bool {
if let Ok(measure_symbol) = self.member_evaluator.as_measure() {
measure_symbol.can_used_as_addictive_in_multplied()
Copy link
Member

Choose a reason for hiding this comment

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

Would be nice to rename this too:

Suggested change
measure_symbol.can_used_as_addictive_in_multplied()
measure_symbol.can_be_used_as_additive_in_multplied()

@waralexrom waralexrom changed the title feat(tesseract): Catch up with features recently added to BaseQuery fix(tesseract): Rolling window with few time dimensions, filter_group in segments and member expressions fixes Jun 13, 2025
@waralexrom waralexrom changed the title fix(tesseract): Rolling window with few time dimensions, filter_group in segments and member expressions fixes fix(tesseract): Fix rolling window with few time dimensions, filter_group in segments and member expressions Jun 13, 2025
@waralexrom waralexrom merged commit 98d334b into master Jun 13, 2025
77 checks passed
@waralexrom waralexrom deleted the tesseract-various-fixes branch June 13, 2025 11:31
marianore-muttdata pushed a commit to MuttData/cube that referenced this pull request Jun 17, 2025
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.

4 participants