Skip to content

Patched DF 52.5.0 (revision b)#98

Draft
erratic-pattern wants to merge 10 commits into
base-df-upgrade-ver5250from
upgrade-df-ver5250-b
Draft

Patched DF 52.5.0 (revision b)#98
erratic-pattern wants to merge 10 commits into
base-df-upgrade-ver5250from
upgrade-df-ver5250-b

Conversation

@erratic-pattern
Copy link
Copy Markdown

@erratic-pattern erratic-pattern commented May 13, 2026

Adds two commits on top of revision a to fix an InfluxQL signature-mismatch error regression discovered during the DF 52.5.0 upgrade.

New commits on top of revision a

  1. improve OneOf signature diagnostics — cherry-pick of fix: avoid internal errors for OneOf signature mismatches apache/datafusion#21032, squashed to a single commit and adapted for 52.5.0. Replaces the internal_err! path for TypeSignature::OneOf mismatches with a plan_err! path that carries actionable diagnostics, and restores function-specific Sum not supported for Boolean / Avg not supported for Boolean semantic errors.

    The 52.5.0 adaptation (folded into this commit) covers fallout from the cherry-pick assuming the friendlier Display impl from Improve formatting of datatypes apache/datafusion#20605, which is not on 52.5.0:

    • drops two unused imports in datafusion-expr's test module (IntervalUnit, logical_int64) that fail -D warnings;
    • updates two sql_integration tests and the type_coercion::functions unit tests whose assertions were written against Improve formatting of datatypes apache/datafusion#20605's output;
    • updates sqllogictest expected-error patterns across array.slt, arrow_typeof.slt, datetime/timestamps.slt, encoding.slt, errors.slt, expr.slt, functions.slt, named_arguments.slt, scalar.slt, spark/math/hex.slt, and string/string_literal.slt.

    Drop when fix: avoid internal errors for OneOf signature mismatches apache/datafusion#21032 lands upstream and reaches a 52.x point release.

  2. chore(deps): bump astral-tokio-tar from 0.6.1 to 0.6.2 — standalone, unrelated to fix: avoid internal errors for OneOf signature mismatches apache/datafusion#21032. Patches RUSTSEC-2026-0145 (PAX header desynchronization), a newly-published advisory that surfaced in this branch's CI. Transitive dev-dependency; Cargo.lock-only.

Carry-forward from revision a

Unchanged from #97 — the IOx-specific patch series plus the rev-a dependency bump (chore(deps): bump rustls-webpki and astral-tokio-tar for cargo audit).

Verification

Fork CI green (64/64).

alamb and others added 8 commits May 6, 2026 02:23
Includes fix for FixedSizeBinary LEFT JOIN bug
- apache/arrow-rs#8981

Cherry-picked test and API updates from
- apache#19355
…e#19904)

## 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 apache#123` indicates that this PR will close issue apache#123.
-->

- Part of apache#19798

## 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.
-->

This is an edge case, would prefer to fix upstream in arrow-rs instead
of having handling code here, so just disable test for now.

- arrow-rs issue: apache/arrow-rs#9227

## 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.
-->

Disable edge-case array_union SLT

## 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)?
-->

Test related change

## Are there any user-facing changes?

<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->

No.

<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
Hot-fix for security_audit CI on upgrade-df-ver5250-a. Addresses 5 RUSTSEC
advisories that landed between 2026-04-14 and 2026-04-27, after upstream DataFusion
52.5.0 was tagged:

- RUSTSEC-2026-0098 — rustls-webpki: name constraints for URI names
- RUSTSEC-2026-0099 — rustls-webpki: name constraints accepted for wildcard certs
- RUSTSEC-2026-0104 — rustls-webpki: reachable panic in CRL parsing
- RUSTSEC-2026-0112 — astral-tokio-tar: PAX header desync
- RUSTSEC-2026-0113 — astral-tokio-tar: unpack_in chmod via symlink

Bumps Cargo.lock only (no Cargo.toml dep range changes):
- astral-tokio-tar 0.6.0 -> 0.6.1
- rustls-webpki 0.103.10 -> 0.103.13

When upstream backports these (or the next 52.x release ships them), this
commit will auto-drop on rebase.
}

#[test]
fn test_one_of_drops_internal_error_and_combines_type_errors() {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Carry note (notes 1 + 2 consolidated): These test_one_of_* tests come from upstream apache#21032. Their assertions were written against the friendlier Display output from apache#20605, which landed after 52.5.0 and isn't picked here. I adapted them to 52.5's verbose form (TypeSignatureClass::Decimal, TypeSignatureClass::Native(LogicalType(Native(String), String)), etc.).

The verbose TypeSignatureClass:: prefix in the user-facing error message is the visible consequence of the same gap — when we adopt apache#20605 (or apache#21032 lands upstream and we drop this carry), both the assertions and the message wording clean up together.

};
use datafusion_common::{HashMap, Result, ScalarValue, exec_err, not_impl_err};
use datafusion_common::{
DataFusionError, HashMap, Result, ScalarValue, exec_err, not_impl_err,
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Carry note (note 3): apache#21032 also added use datafusion_expr::expr::AggregateFunction; and use datafusion_expr::expr_fn::cast; here, as context lines — those imports are used elsewhere on upstream main but not in 52.5.0. Trimmed them to keep the build warning-free. They come back automatically when we drop this carry.

@alamb
Copy link
Copy Markdown
Collaborator

alamb commented May 18, 2026

I think we should clean up the CI failures

@github-actions github-actions Bot added the sql label May 18, 2026
Cherry-pick of apache#21032. Adapted for 52.5.0:

- Two unused imports in datafusion-expr's test module (`IntervalUnit`,
  `logical_int64`) compile-fail under -D warnings; dropped.
- Two sql-integration tests and several sqllogictest expected-error
  patterns assumed the friendlier Display impl from apache#20605
  was already on 52.5.0 (it isn't); updated those patterns to the
  pre-apache#20605 verbose `TypeSignatureClass::Native(LogicalType(...))` shape
  and to the post-apache#21032 `failed with: ...` (no quoted inner message)
  shape.
- Also includes the author's own follow-up CI fix (was a separate commit
  upstream, folded here).

Signed-off-by: yaommen <myanstu@163.com>
Patches RUSTSEC-2026-0145 (PAX header desynchronization, GHSA-3cv2-h65g-fgmm).
Transitive dev-dep of `datafusion-cli` via `testcontainers` /
`testcontainers-modules`; Cargo.lock-only update.
@alamb
Copy link
Copy Markdown
Collaborator

alamb commented May 20, 2026

😍 -- looking good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants