Skip to content

Conversation

@AnjaliChoudhary99
Copy link

  • Merged CTE reference resolution tests into main cte.slt file
  • Added CREATE TABLE statement for orders table used in tests
  • Fixed 3 case-sensitivity issues: changed 'WHERE N < 10' to 'WHERE n < 10'

Fixes #19786

Which issue does this PR close?

Rationale for this change

This PR consolidates the small test file cte_quoted_reference.slt into the main cte.slt file as requested in issue #19786. The separate file was small enough that it didn't need to be maintained independently, and consolidating it improves code organization and maintainability.

What changes are included in this PR?

  • Merged CTE reference resolution tests from cte_quoted_reference.slt into cte.slt
  • Added CREATE TABLE orders AS VALUES (1), (2); statement to support the merged tests
  • Fixed 3 pre-existing case-sensitivity bugs by changing WHERE N < 10 to WHERE n < 10 in recursive CTE tests
  • Deleted cte_quoted_reference.slt as it's now consolidated into the main file

Are these changes tested?

Yes, all changes are tested:

  • The consolidated tests from cte_quoted_reference.slt are now part of the cte.slt test suite
  • All sqllogictest tests pass successfully: cargo test --test sqllogictests -- cte
  • The case-sensitivity fixes ensure that field references match their definitions (lowercase n)

Are there any user-facing changes?

No, there are no user-facing changes. This is purely a test file reorganization that improves code maintainability without affecting DataFusion's functionality or API.

- Merged CTE reference resolution tests into main cte.slt file
- Added CREATE TABLE statement for orders table used in tests
- Fixed 3 case-sensitivity issues: changed 'WHERE N < 10' to 'WHERE n < 10'

Fixes apache#19786
Copy link
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

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

Fixed 3 pre-existing case-sensitivity bugs by changing WHERE N < 10 to WHERE n < 10 in recursive CTE tests

Not exactly sure how these are bugs 🤔

----
1
2

Copy link
Contributor

Choose a reason for hiding this comment

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

Would be good to ensure we cleanup the orders table to ensure this section of tests are isolated

@alamb
Copy link
Contributor

alamb commented Jan 18, 2026

Thank you @AnjaliChoudhary99

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.

Consolidate datafusion/sqllogictest/test_files/cte_quoted_reference.slt

3 participants