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

fix(rust): Functions for streaming require streaming feature #18602

Merged
merged 1 commit into from
Sep 7, 2024

Conversation

eitsupi
Copy link
Contributor

@eitsupi eitsupi commented Sep 7, 2024

No description provided.

@eitsupi eitsupi changed the title fix(rust): functions for streaming require streaming feature fix(rust): Functions for streaming require streaming feature Sep 7, 2024
@github-actions github-actions bot added fix Bug fix rust Related to Rust Polars and removed title needs formatting labels Sep 7, 2024
Copy link

codecov bot commented Sep 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.84%. Comparing base (76b8f46) to head (25dcd96).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #18602      +/-   ##
==========================================
- Coverage   79.84%   79.84%   -0.01%     
==========================================
  Files        1501     1501              
  Lines      201764   201836      +72     
  Branches     2869     2869              
==========================================
+ Hits       161107   161155      +48     
- Misses      40111    40135      +24     
  Partials      546      546              

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

@orlp
Copy link
Collaborator

orlp commented Sep 7, 2024

I don't see why this fix would be necessary? The optimization flags for (new) streaming don't require those features.

@eitsupi
Copy link
Contributor Author

eitsupi commented Sep 7, 2024

I don't see why this fix would be necessary?

Unlike the following functions, these functions can be used without the feature flags, which can cause panic. (I encountered.)

/// Toggle common subplan elimination optimization on or off
#[cfg(feature = "cse")]
pub fn with_comm_subplan_elim(mut self, toggle: bool) -> Self {
self.opt_state.set(OptFlags::COMM_SUBPLAN_ELIM, toggle);
self
}
/// Toggle common subexpression elimination optimization on or off
#[cfg(feature = "cse")]
pub fn with_comm_subexpr_elim(mut self, toggle: bool) -> Self {
self.opt_state.set(OptFlags::COMM_SUBEXPR_ELIM, toggle);
self
}

I simply thought it would be more user-friendly to tie these to the flags for a consistency reason, so if you don't need it and don't mind causing a panic, then close it.

@orlp
Copy link
Collaborator

orlp commented Sep 7, 2024

Alright if using them can cause a panic down the line I don't mind them being feature gated.

@ritchie46 ritchie46 merged commit a0d28fd into pola-rs:main Sep 7, 2024
19 of 22 checks passed
@eitsupi eitsupi deleted the fix-feature branch September 7, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants