You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jayzhan211 (via GitHub)" <gi...@apache.org> on 2024/02/29 00:52:42 UTC
[PR] Minor: Support LargeList List Range indexing and fix large list handling in ConstEvaluator [arrow-datafusion]
jayzhan211 opened a new pull request, #9393:
URL: https://github.com/apache/arrow-datafusion/pull/9393
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Closes #.
There is a bug in ConstEvaluator for large list handling, to add a test for it, I need to support LargeList for list range indexing.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
## Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
## Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor: Support LargeList List Range indexing and fix large list handling in ConstEvaluator [arrow-datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #9393:
URL: https://github.com/apache/arrow-datafusion/pull/9393#discussion_r1509353216
##########
datafusion/expr/src/field_util.rs:
##########
@@ -89,10 +89,11 @@ impl GetFieldAccessSchema {
Self::ListRange { start_dt, stop_dt, stride_dt } => {
match (data_type, start_dt, stop_dt, stride_dt) {
(DataType::List(_), DataType::Int64, DataType::Int64, DataType::Int64) => Ok(Field::new("list", data_type.clone(), true)),
- (DataType::List(_), _, _, _) => plan_err!(
+ (DataType::LargeList(_), DataType::Int64, DataType::Int64, DataType::Int64) => Ok(Field::new("large_list", data_type.clone(), true)),
Review Comment:
Look like the case for
```rust
Self::ListIndex{ key_dt } => {
```
is also missing `LargeList` case -- maybe we can add that as a follow on PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor: Support LargeList List Range indexing and fix large list handling in ConstEvaluator [arrow-datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #9393:
URL: https://github.com/apache/arrow-datafusion/pull/9393
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Minor: Support LargeList List Range indexing and fix large list handling in ConstEvaluator [arrow-datafusion]
Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on code in PR #9393:
URL: https://github.com/apache/arrow-datafusion/pull/9393#discussion_r1506850272
##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -523,9 +523,13 @@ impl<'a> ConstEvaluator<'a> {
DataFusionError::Execution(format!("Could not evaluate the expression, found a result of length {}", a.len())),
expr,
)
- } else if as_list_array(&a).is_ok() || as_large_list_array(&a).is_ok() {
+ } else if as_list_array(&a).is_ok() {
ConstSimplifyResult::Simplified(ScalarValue::List(
Review Comment:
Main bug. It should be wrapped into ScalarValue::LargeList
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org