Skip to content

test: consolidate ASOF SQL coverage - #24964

Draft
Xuanwo wants to merge 10 commits into
apache:mainfrom
Xuanwo:xuanwo/asof-slt-coverage
Draft

test: consolidate ASOF SQL coverage#24964
Xuanwo wants to merge 10 commits into
apache:mainfrom
Xuanwo:xuanwo/asof-slt-coverage

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Sep 6, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Rationale for this change

ASOF SQL behavior was split between sqllogictest and Rust integration tests. SQL-level results and plan shapes are easier to review and maintain in SLT, while Rust coverage remains useful for setup that SLT cannot express.

GitHub shows the cumulative stack because fork branches cannot be selected as upstream PR bases. The isolated diff is:
Xuanwo/datafusion@xuanwo/asof-sql...xuanwo/asof-slt-coverage

What changes are included in this PR?

  • Move duplicated coercion, EXPLAIN, USING-output, and validation coverage into asof_join.slt.
  • Add result and plan-shape coverage for right-output filtering, projection pruning, expression operands, empty inputs, duplicate left rows, self joins, and multi-key USING.
  • Keep Rust tests that require multi-partition physical plans, unbounded inputs, cross-batch execution, or direct plan-to-SQL roundtrips.

Are these changes tested?

Yes:

  • cargo fmt --all
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test -p datafusion-sqllogictest --test sqllogictests --all-features -- asof_join
  • cargo test -p datafusion --test core_integration asof --all-features
  • Extended workspace tests from the contributor guide

Are there any user-facing changes?

No. This consolidates and expands coverage for the ASOF SQL contract introduced by #23830.

@github-actions github-actions Bot added documentation Improvements or additions to documentation sql SQL Planner logical-expr Logical plan and expressions core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) substrait Changes to the substrait crate labels Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Thank you for opening this pull request!

Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch).

Details
     Cloning apache/main
    Building datafusion v55.0.0 (current)
       Built [  62.360s] (current)
     Parsing datafusion v55.0.0 (current)
      Parsed [   0.035s] (current)
    Building datafusion v55.0.0 (baseline)
       Built [  59.339s] (baseline)
     Parsing datafusion v55.0.0 (baseline)
      Parsed [   0.035s] (baseline)
    Checking datafusion v55.0.0 -> v55.0.0 (no change; assume patch)
     Checked [   0.669s] 223 checks: 223 pass, 31 skip
     Summary no semver update required
    Finished [ 124.110s] datafusion
    Building datafusion-expr v55.0.0 (current)
       Built [  29.570s] (current)
     Parsing datafusion-expr v55.0.0 (current)
      Parsed [   0.078s] (current)
    Building datafusion-expr v55.0.0 (baseline)
       Built [  29.602s] (baseline)
     Parsing datafusion-expr v55.0.0 (baseline)
      Parsed [   0.080s] (baseline)
    Checking datafusion-expr v55.0.0 -> v55.0.0 (no change; assume patch)
     Checked [   1.203s] 223 checks: 222 pass, 1 fail, 0 warn, 31 skip

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.50.0/src/lints/inherent_method_missing.ron

Failed in:
  LogicalPlanBuilder::asof_join, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/13b4144fa032bf81b7ddcf1c2dc2dc618eedbec2/datafusion/expr/src/logical_plan/builder.rs:1012
  LogicalPlanBuilder::asof_join, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/13b4144fa032bf81b7ddcf1c2dc2dc618eedbec2/datafusion/expr/src/logical_plan/builder.rs:1012
  LogicalPlanBuilder::asof_join, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/13b4144fa032bf81b7ddcf1c2dc2dc618eedbec2/datafusion/expr/src/logical_plan/builder.rs:1012
  LogicalPlanBuilder::asof_join, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/13b4144fa032bf81b7ddcf1c2dc2dc618eedbec2/datafusion/expr/src/logical_plan/builder.rs:1012

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [  61.437s] datafusion-expr
    Building datafusion-sql v55.0.0 (current)
       Built [  43.252s] (current)
     Parsing datafusion-sql v55.0.0 (current)
      Parsed [   0.031s] (current)
    Building datafusion-sql v55.0.0 (baseline)
       Built [  43.531s] (baseline)
     Parsing datafusion-sql v55.0.0 (baseline)
      Parsed [   0.033s] (baseline)
    Checking datafusion-sql v55.0.0 -> v55.0.0 (no change; assume patch)
     Checked [   0.220s] 223 checks: 223 pass, 31 skip
     Summary no semver update required
    Finished [  88.036s] datafusion-sql
    Building datafusion-sqllogictest v55.0.0 (current)
       Built [ 102.125s] (current)
     Parsing datafusion-sqllogictest v55.0.0 (current)
      Parsed [   0.021s] (current)
    Building datafusion-sqllogictest v55.0.0 (baseline)
       Built [ 102.025s] (baseline)
     Parsing datafusion-sqllogictest v55.0.0 (baseline)
      Parsed [   0.023s] (baseline)
    Checking datafusion-sqllogictest v55.0.0 -> v55.0.0 (no change; assume patch)
     Checked [   0.096s] 223 checks: 223 pass, 31 skip
     Summary no semver update required
    Finished [ 206.775s] datafusion-sqllogictest
    Building datafusion-substrait v55.0.0 (current)
       Built [ 313.462s] (current)
     Parsing datafusion-substrait v55.0.0 (current)
      Parsed [   0.016s] (current)
    Building datafusion-substrait v55.0.0 (baseline)
       Built [ 316.517s] (baseline)
     Parsing datafusion-substrait v55.0.0 (baseline)
      Parsed [   0.019s] (baseline)
    Checking datafusion-substrait v55.0.0 -> v55.0.0 (no change; assume patch)
     Checked [   0.233s] 223 checks: 223 pass, 31 skip
     Summary no semver update required
    Finished [ 631.922s] datafusion-substrait

@github-actions github-actions Bot added the auto detected api change Auto detected API change label Sep 6, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.80967% with 90 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.68%. Comparing base (9fc7a4d) to head (f91b961).
⚠️ Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
datafusion/sql/src/unparser/plan.rs 61.93% 57 Missing and 10 partials ⚠️
datafusion/sql/src/relation/join.rs 77.35% 5 Missing and 7 partials ⚠️
datafusion/expr/src/logical_plan/builder.rs 87.77% 3 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24964      +/-   ##
==========================================
+ Coverage   81.57%   81.68%   +0.10%     
==========================================
  Files        1123     1124       +1     
  Lines      410789   413484    +2695     
  Branches   410789   413484    +2695     
==========================================
+ Hits       335120   337756    +2636     
+ Misses      55913    55833      -80     
- Partials    19756    19895     +139     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

auto detected api change Auto detected API change core Core DataFusion crate documentation Improvements or additions to documentation logical-expr Logical plan and expressions sql SQL Planner sqllogictest SQL Logic Tests (.slt) substrait Changes to the substrait crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants