Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for false table reference negative #99

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

crisptrutski
Copy link
Collaborator

This is an example where a query reads from two tables, but the analyzer claims that it read from neither.

@crisptrutski crisptrutski enabled auto-merge (squash) September 5, 2024 12:00
Copy link
Contributor

@tsmacdonald tsmacdonald left a comment

Choose a reason for hiding this comment

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

:(

@crisptrutski crisptrutski merged commit 92e0c21 into master Sep 9, 2024
4 checks passed
@crisptrutski crisptrutski deleted the false-table-negative branch September 9, 2024 07:16
Comment on lines +1 to +3
WITH c AS (SELECT x FROM b),
b AS (SELECT y FROM a),
a AS (SELECT x FROM c)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Worth noting that Postgres rejects this query, thinking that is has forward references. MySQL happily executes it and returns the product of a and b.

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

Successfully merging this pull request may close these issues.

2 participants