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

More advanced table extractor to handle compound queries #107

Merged
merged 6 commits into from
Oct 25, 2024

Conversation

crisptrutski
Copy link
Collaborator

This makes things much more useful.

Wasn't as bad as I expected!

@crisptrutski crisptrutski changed the title More advanced table extractor, supported compound queries More advanced table extractor to handle compound queries Oct 24, 2024
private static void accTables(Select select, Set<Table> tables, Stack<Set<String>> cteAliasScopes) {
if (select instanceof PlainSelect) {
accTables(select.getPlainSelect(), tables, cteAliasScopes);
} else if (select instanceof ParenthesedSelect) {
Copy link
Contributor

Choose a reason for hiding this comment

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

is this ParenthesedSelect a nested select or what?

Copy link
Collaborator Author

@crisptrutski crisptrutski Oct 24, 2024

Choose a reason for hiding this comment

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

Sorry the context has left my brain a bit now 😄

I think you're right, and from a practical point of view its a SELECT which gets bound to an alias.

I can't recall if this is both column and table bindings, or just one of those.

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @crisptrutski and the rest of your teammates on Graphite Graphite

@crisptrutski crisptrutski merged commit 791ab33 into master Oct 25, 2024
5 checks passed
Copy link
Collaborator Author

Merge activity

  • Oct 25, 3:15 AM EDT: A user merged this pull request with Graphite.

@crisptrutski crisptrutski deleted the compound-queries branch October 25, 2024 07:15
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