Skip to content

Conversation

@lliangyu-lin
Copy link
Contributor

@lliangyu-lin lliangyu-lin commented Jun 30, 2025

Which issue does this PR close?

Rationale for this change

The onlyif condition in sqllogictest test files are DataFusion

But current runner attaches Datafusion or DatafusionSubstraitRoundTrip which doesn't exists in any of the test files. Hence, causing the statement / query to be skipped.

What changes are included in this PR?

  • Update label in the test files to make sure statement / query is being run for datafusion.

Are these changes tested?

Yes

  • cargo test --test sqllogictests -- --substrait-round-trip pg_compat_null.slt (passing)
  • cargo test --test sqllogictests -- --substrait-round-trip pg_compat_union.slt (no longer seeing the table not found exeception, but [substrait] [sqllogictest] Unsupported producing row from empty relation #16271 still exists)
  • cargo test --test sqllogictests -- --substrait-round-trip pg_compat_simple.slt (no longer seeing the table not found exeception)
  • cargo test --test sqllogictests -- --substrait-round-trip pg_compat_window.slt (no longer seeing the table not found exeception)

Are there any user-facing changes?

No

@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Jun 30, 2025
@alamb
Copy link
Contributor

alamb commented Jul 2, 2025

@gabotechs do you have time to review this PR?

@alamb
Copy link
Contributor

alamb commented Jul 2, 2025

Thank you @lliangyu-lin 🙏

setup_scratch_dir(&relative_path)?;

let count: u64 = get_record_count(&path, "DatafusionSubstraitRoundTrip".to_string());
let count: u64 = get_record_count(&path, "DataFusion".to_string());
Copy link
Contributor

Choose a reason for hiding this comment

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

We are going to need to keep the "DatafusionSubstraitRoundTrip" engine name for the future, we'll want to be able to ignore some statements based on it, something like:

skipif DatafusionSubstraitRoundTrip

Instead of changing the engine name, I'd go to the relevant tests in

And do the following replacement:

- onlyif DataFusion
+ skipif postgres

That way we maintain the ability to skip specific statements in DatafusionSubstraitRoundTrip mode, while prompting any engine other than postgres to actually try to comply with that test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the context! Updated to skipif postgres. In this case, do we still need to change the label Datafusion -> DataFusion? Since there are no more test files with condition onlyif DataFusion.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd be nice to keep the label as DatafusionSubstraitRoundTrip so that we can use it in the future for skipping tests failing on Substrait roundtrip mode 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I guess my question was regarding the label DataFusion and Datafusion being used in the test files, which might be a typo, and not about DatafusionSubstraitRoundTrip.
But I saw Datafusion label is still being used in other test files, so I removed my changes.

Copy link
Contributor

@gabotechs gabotechs left a comment

Choose a reason for hiding this comment

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

Nice! LGTM 👍 cc @alamb

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @lliangyu-lin and @gabotechs

@alamb
Copy link
Contributor

alamb commented Jul 7, 2025

run extended tests

@alamb alamb merged commit e162ec5 into apache:main Jul 7, 2025
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[substrait] [sqllogictest] table 'datafusion.public.aggregate_test_100_by_sql' not found

3 participants