[pull] main from apache:main#110
Merged
pull[bot] merged 3 commits intoburaksenn:mainfrom Apr 16, 2026
Merged
Conversation
…ting issue (#20469) ## Which issue does this PR close? - Closes #20466. ## Rationale for this change Currently, Spark `slice` function accepts Null Arrays and return `Null` for this particular queries. DataFusion-Spark `slice` function also needs to return `NULL` when Null Array is set. **Spark Behavior** (tested with latest Spark master): ``` > SELECT slice(NULL, 1, 2); +-----------------+ |slice(NULL, 1, 2)| +-----------------+ | null| +-----------------+ ``` **DF Behaviour:** Current: ``` query error SELECT slice(NULL, 1, 2); ---- DataFusion error: Internal error: could not cast array of type Null to arrow_array::array::list_array::GenericListArray<i32>. This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues ``` New: ``` query ? SELECT slice(NULL, 1, 2); ---- NULL ``` ## What changes are included in this PR? Explained under first section. ## Are these changes tested? Added new UT cases for both `slice.rs` and `slice.slt`. ## Are there any user-facing changes? Yes, currently, `slice` function returns error message for `Null` Array inputs, however, expected behavior is to be returned `NULL` so end-user will get expected result instead of error message. --------- Co-authored-by: Martin Grigorov <martin-g@users.noreply.github.com>
## 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. --> Update tokio from 1.51 to 1.52 ## 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. --> Allow experimenting with a new setting `Builder::enable_eager_driver_handoff` in tokio, among other improvements in the latest tokio version. ## 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. --> Tokio version update in Cargo.toml ## 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)? --> All existing tests pass ## Are there any user-facing changes? No <!-- 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. -->
…ushDecoderStreamState (#21663) ## Which issue does this PR close? - Closes #21662. ## Rationale for this change Miri detects a Stacked Borrows violation in `PushDecoderStreamState::transition`. A nested `async` block captures `&mut self` as a single opaque mutable reference. At the `.await` on `get_byte_ranges`, the future yields, and the `Unique` tag on the borrow stack is invalidated by a `SharedReadOnly` retag. When the future resumes, `push_ranges` attempts a two-phase retag through the now-invalidated tag. This was found by [Apache DataFusion Comet](https://github.com/apache/datafusion-comet), which runs Miri in CI. ## What changes are included in this PR? Remove the nested `async` block in the `NeedsData` arm of `PushDecoderStreamState::transition` and inline the IO (`get_byte_ranges`) and CPU (`push_ranges`) operations as separate statements. Since `transition` is already an `async fn`, the `.await` works directly in the loop body. Without the nested block, the compiler can split the borrows of `self.reader` and `self.decoder` into disjoint field borrows, keeping the borrow stack valid across the yield point. Also removes the now-unused `parquet::errors::ParquetError` import. ## Are these changes tested? Covered by existing parquet reader tests. The original violation was caught by Miri, which DataFusion does not currently run in CI. ## Are there any user-facing changes? No.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )