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

Fix AST coverage check error #389

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

zookatron
Copy link

Currently when you run a query against pg-mem with fully qualified column names like SELECT "public"."test"."val" FROM "public"."test", it gives you an AST coverage error like The query you ran generated an AST which parts have not been read by the query planner. This means that those parts could be ignored: ⇨ .columns[0].expr.table.name ("test"). This is happening because when the query planner retrieves the column data, in some cases it never actually checks the statement table name to be sure it matches before returning the column description. This commit refactors the column retrieval code to ensure this always gets checked.

I'm not familiar enough with the internal logic of this library to know if this fix is the "correct' way of doing this so I would like feedback on whether or not there is a better solution. But this logic fix makes sense to me so I figured I would start with a PR.

I believe this should fix this old bug as well: #130

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

Successfully merging this pull request may close these issues.

None yet

1 participant