Skip to content

Conversation

@itsjunetime
Copy link
Contributor

Which issue does this PR close?

Helps with reviewing of #12135

Rationale for this change

These are just a few changes that make the code cleaner/easier to understand/etc that I added when filing #12135. It was pointed out to me, though, that these make the PR harder to review as there's a lot of changes not directly related to the PR. So I'm pulling those changes into this PR so that they are hidden from the diff once this is merged, thus making the PR easier to review.

What changes are included in this PR?

A few clean-ups that shouldn't change behavior at all.

Are these changes tested?

All tests pass just like they do on main.

Are there any user-facing changes?

Shouldn't be

@github-actions github-actions bot added physical-expr Changes to the physical-expr crates core Core DataFusion crate labels Aug 29, 2024
@github-actions github-actions bot added the common Related to common crate label Aug 29, 2024
@itsjunetime
Copy link
Contributor Author

It looks like clippy failed due to some internal CI connectivity issue - I don't think I can rerun them by myself.

@alamb
Copy link
Contributor

alamb commented Sep 1, 2024

It looks like clippy failed due to some internal CI connectivity issue - I don't think I can rerun them by myself.

Thanks @itsjunetime

I have restarted the CI (you do need to be a datafusion committer to restart the jobs individually)

One trick to get github to rerun the CI is to close the PR and then reopen it (that will trigger rerunning the whole PR)

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks like a very nice set of cleanups to me @itsjunetime -- thank you

/// - the expression can be marked as `TableProviderFilterPushDown::Exact` once this filtering
/// was performed
pub fn expr_applicable_for_cols(col_names: &[String], expr: &Expr) -> bool {
pub fn expr_applicable_for_cols(col_names: &[&str], expr: &Expr) -> bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a nice removal of some clones 👍

let rr = as_boolean_array($RIGHT).expect("boolean_op failed to downcast array");
Ok(Arc::new($OP(&ll, &rr)?))
}};
#[inline]
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@alamb alamb merged commit 93fb715 into apache:main Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate core Core DataFusion crate physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants