-
Notifications
You must be signed in to change notification settings - Fork 162
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
feat: Array element extraction #899
Conversation
native/spark-expr/src/list.rs
Outdated
self: Arc<Self>, | ||
children: Vec<Arc<dyn PhysicalExpr>>, | ||
) -> datafusion_common::Result<Arc<dyn PhysicalExpr>> { | ||
Ok(Arc::new(ListExtract::new( |
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.
nit: perhaps add an assertion that children
is of the expected length
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.
Sure. Out of curiosity is this part of physical expressions (with_new_children
) actually used in how Comet is using DataFusion?
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.
It will be once #907 is merged
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.
LGTM. Thanks @Kimahriman
Which issue does this PR close?
Closes #898
Rationale for this change
More array/list support. Implemented a custom PhysicalExpr rather than using DataFusion's
ArrayElement
to support ANSI fail on error, default value, and GetArrayItem's zero based indexing.What changes are included in this PR?
Support for array extraction via the Spark
GetArrayItem
andElementAt
expressions.How are these changes tested?
New UT