← Back to Pull requests

ORC-2235: [C++] Preserve CMAKE_MODULE_PATH when dependency discovery fails #2735

Closed
unknown closed this pull request without merging on Nov 06, 2026 14:35 UTC
View on GitHub
unknown unknown commented on Nov 06, 2026 08:54 UTC
Author

What changes were proposed in this pull request?

Isolate dependency discovery in orcConfig.cmake with a CMake variable scope, propagating orc_FOUND and orc_NOT_FOUND_MESSAGE while keeping CMAKE_MODULE_PATH local even on an early return.

The patch only changes c++/orcConfig.cmake.in; it does not modify test CMakeLists files or add test infrastructure.

Why are the changes needed?

ORC-2235

find_dependency() returns from the package config when a dependency cannot be found. The previous manual restoration of CMAKE_MODULE_PATH was therefore skipped, leaking ORC's module search path into the consuming project.

This caused a misleading AWS dependency-discovery failure in Arrow after ORC's LZ4 dependency lookup failed. apache/arrow#55415 adds a caller-side workaround; this PR fixes the underlying ORC configuration leak. It does not change LZ4 dependency-selection policy.

How was this patch tested?

On macOS with CMake 4.3.1:

cmake -S . -B build -DBUILD_JAVA=OFF
cmake --build build --target orc-test --parallel 8
cmake --build build --target test-out

After removing the test-infrastructure changes, both existing CTest tests (orc-test and tool-test) passed.

Separately verified six temporary, out-of-tree configure scenarios with CMake 3.25.2 and 4.3.1: successful/missing dependency discovery with CMAKE_MODULE_PATH initially undefined, empty, or containing multiple directories. All six passed with the scoped fix; all three missing-dependency scenarios reproduced the leak against the original template. No regression test files are included in this PR.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: OpenAI Codex (desktop app 26.1029.61003)

Diff: 224 lines (+168 / -56) across 2 files Reviewer: raulcd Review duration: 340m
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 224 lines diff across 2 files
0.37
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.324
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #2735"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 36.9% (MEDIUM) · Higher = larger blast radius
36.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.6% · Safe to merge
14.6%
Repository