-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add datafusion example of expression apis #3741
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Thanks @alamb
d98b766
to
3eae3ff
Compare
b8550a6
to
a40b889
Compare
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
//! This program demonstrates the DataFusion expression simplification API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were inlined into expr_api.rs
examples
/// to qualified or unqualified fields by name. | ||
/// * `props` - The Arrow schema for the input, used for determining expression data types | ||
/// when performing type coercion. | ||
pub fn simplify_expr( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved my proposed API changes into #3758 |
a40b889
to
27dcf9e
Compare
col("i") + lit(3) | ||
); | ||
|
||
// TODO uncomment when https://github.com/apache/arrow-datafusion/issues/1160 is done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do a partial fix for this in a follow on PR
@@ -34,7 +34,7 @@ pub use crate::execution::options::{ | |||
pub use datafusion_common::Column; | |||
pub use datafusion_expr::{ | |||
expr_fn::*, | |||
lit, | |||
lit, lit_timestamp_nano, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
driveby fix
Benchmark runs are scheduled for baseline = 3af09fb and contender = c27b56f. c27b56f is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Draft as it builds on:Introduce public API to call type coercion #3742Which issue does this PR close?
re #3719
re #3708
re #3740
Rationale for this change
Documenting the APIs will make the more discoverable and improve the user experience
What changes are included in this PR?
Add a new
expr_api
exampleAre there any user-facing changes?
Better docs