Skip to content

fix: [branch-1.2] locate the test UDF library under Cargo's Rust 1.100 build layout (#7617) - #7665

Merged
andygrove merged 1 commit into
apache:branch-1.2from
andygrove:backport-7617-branch-1.2
Nov 17, 2026
Merged

andygrove merged 1 commit into
apache:branch-1.2from
andygrove:backport-7617-branch-1.2

Conversation

@andygrove

Copy link
Copy Markdown
Member

Which issue does this PR close?

Backport of #7617 to branch-1.2. Closes #7609 on this branch.

Rationale for this change

Rust 1.100 became the stable toolchain on 2026-11-12, and branch-1.2's rust-toolchain.toml tracks stable. Cargo 1.100 splits a build script's OUT_DIR into build/<pkg>/<hash>/out, so the fixed-depth lookup in native/core/build.rs now points COMET_TEST_UDFS_LIB at target/debug/build/libcomet_test_udfs.so. The c_udf loader tests then fail to load the library, and rust-test fails on every pull request against branch-1.2, including the open backports #7513, #7514 and #7515. See #7617 for the full analysis.

What changes are included in this PR?

Cherry-pick of d504163 (git cherry-pick -x) with no conflicts and no adaptations. build.rs now finds the profile directory as the parent of the nearest build ancestor of OUT_DIR, which works under both Cargo layouts.

Other release branches: branch-1.2 is the newest release branch. branch-1.1 and older don't have the c_udf loader or COMET_TEST_UDFS_LIB, so they don't need this.

How are these changes tested?

On this branch with Rust 1.100.0 (macOS), after cargo build -p comet-test-udfs, the 42 c_udf unit tests pass (cargo test -p datafusion-comet --lib c_udf). With build.rs reverted to branch-1.2's version, the same tests fail to load the library, which matches the rust-test failures on #7513, #7514 and #7515.

🤖 Generated with Claude Code

apache#7617)

Rust 1.100 splits the build script output directory into <pkg>/<hash>, so the fixed-depth ancestor lookup in native/core/build.rs resolved COMET_TEST_UDFS_LIB to target/<profile>/build instead of target/<profile>. Find the profile directory as the parent of the nearest build ancestor of OUT_DIR, which works under both layouts.

(cherry picked from commit d504163)
@andygrove andygrove added the bug Something isn't working label Nov 17, 2026
@andygrove
andygrove merged commit 987cf21 into apache:branch-1.2 Nov 17, 2026
60 checks passed
andygrove added a commit to andygrove/datafusion-comet that referenced this pull request Nov 17, 2026
Picks up apache#7665, which fixes the c_udf cache tests failing in rust-test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
andygrove added a commit to andygrove/datafusion-comet that referenced this pull request Nov 17, 2026
Picks up apache#7665, which fixes the c_udf cache tests failing in rust-test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
andygrove added a commit to andygrove/datafusion-comet that referenced this pull request Nov 17, 2026
Picks up apache#7665, which fixes the c_udf cache tests failing in rust-test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants