Skip to content

Commit e275715

Browse files
authored
minor: Make union_with_mix_of_presorted_and_explicitly_resorted_inputs_impl cross platform (#22478)
## Which issue does this PR close? - N/A. ## Rationale for this change Fix two tests in `core` due to path issues. ## What changes are included in this PR? - Updated `union_with_mix_of_presorted_and_explicitly_resorted_inputs_impl` to handle the path in a cross platform way. ## Are these changes tested? Yes. ## Are there any user-facing changes? No.
1 parent 528ca74 commit e275715

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • datafusion/core/tests/dataframe

datafusion/core/tests/dataframe/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3345,7 +3345,11 @@ async fn union_with_mix_of_presorted_and_explicitly_resorted_inputs_impl(
33453345

33463346
// To be able to remove user specific paths from the plan, for stable assertions
33473347
let testdata_clean = Path::new(&testdata).canonicalize()?.display().to_string();
3348-
let testdata_clean = testdata_clean.strip_prefix("/").unwrap_or(&testdata_clean);
3348+
let testdata_clean = testdata_clean.replace("\\", "/");
3349+
let testdata_clean = testdata_clean
3350+
.strip_prefix("//?/")
3351+
.or_else(|| testdata_clean.strip_prefix("/"))
3352+
.unwrap_or(&testdata_clean);
33493353

33503354
// Use displayable() rather than explain().collect() to avoid table formatting issues. We need
33513355
// to replace machine-specific paths with variable lengths, which breaks table alignment and

0 commit comments

Comments
 (0)