Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Jul 5, 2024

Which issue does this PR close?

Follow on to #11240

Rationale for this change

Some of the code manipulating ConstExpr was getting unweidly especially after Arc::clone is required

What changes are included in this PR?

  1. Add ConstExpr::from(..) to make creating ConstExpr more concise
  2. Add some doc examples
  3. Update code to use the new API

Are these changes tested?

Existing CI

Are there any user-facing changes?

@github-actions github-actions bot added physical-expr Changes to the physical-expr crates core Core DataFusion crate labels Jul 5, 2024
});
let constants = constants
.into_iter()
.map(|expr| ConstExpr::from(expr).with_across_partitions(true));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this change makes it easier to follow the logic here

@alamb alamb marked this pull request as ready for review July 5, 2024 14:54
@alamb alamb requested a review from mustafasrepo July 5, 2024 14:54
Copy link
Contributor

@mustafasrepo mustafasrepo left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @alamb.

@alamb alamb merged commit b9fdc53 into apache:main Jul 6, 2024
@alamb
Copy link
Contributor Author

alamb commented Jul 6, 2024

Thank you for the review @mustafasrepo

@alamb alamb deleted the alamb/const_expr_api branch July 6, 2024 11:28
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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