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

Support uses of BACK that cause correlated references: SQLGlot conversion #234

Merged
merged 128 commits into from
Feb 17, 2025

Conversation

knassre-bodo
Copy link
Contributor

@knassre-bodo knassre-bodo commented Jan 28, 2025

Child PR of #269 that is part of addressing #141. Adds the SQLGlot conversion step. With these changes, all SQLGlot correlation queries are functional except for:

  • TPC-H queries: 5 & 22
  • Correl queries: 1, 2, 3, 6, 8, 9, 15, 17, 18, 19, 20

These remainders need to be handled via the decorrelation cases in the comments of #141. Specifically:

  • Singular: Correl 8
  • Aggregation: TPC-H Q5, TPC-H Q22, Correl 1, Correl 2, Correl 3, Correl 18, Correl 19
  • Semi-Singular: Correl 9, Correl 17, Correl 20
  • Semi-Aggregation: Correl 6

knassre-bodo and others added 30 commits January 13, 2025 11:59
Revision 2

Co-authored-by: Hadia Ahmed <[email protected]>
Revision 3

Co-authored-by: Hadia Ahmed <[email protected]>
Revision 4

Co-authored-by: Hadia Ahmed <[email protected]>
Revision 5

Co-authored-by: Hadia Ahmed <[email protected]>
Revision 6

Co-authored-by: Hadia Ahmed <[email protected]>
Revision 7

Co-authored-by: Hadia Ahmed <[email protected]>
Revision 8

Co-authored-by: Hadia Ahmed <[email protected]>
Revision 9

Co-authored-by: Hadia Ahmed <[email protected]>
Revision 10

Co-authored-by: Hadia Ahmed <[email protected]>
Revision 11

Co-authored-by: Hadia Ahmed <[email protected]>
Revision 12

Co-authored-by: Hadia Ahmed <[email protected]>
Revision 13

Co-authored-by: Hadia Ahmed <[email protected]>
@knassre-bodo knassre-bodo marked this pull request as ready for review February 10, 2025 20:18
Copy link
Collaborator

@amullerbodo amullerbodo left a comment

Choose a reason for hiding this comment

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

no major things to share here.

seen_cols.add(expr)
else:
raise ValueError(
f"Unsupported expression type for column merging: {new_column.__class__.__name__}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

are you able to provide column name here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A column name doesn't necessarily exist in this case (depends on what type new_column is and this is the catch-all for all unsupported types). This case should never occur by construction of the _is_mergeable_column API which prevents anything except these cases.

Copy link
Contributor

@vineetg3 vineetg3 left a comment

Choose a reason for hiding this comment

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

LGTM.

Base automatically changed from kian/corrleated_backref to kian/correlation_omnibus February 17, 2025 20:26
@knassre-bodo knassre-bodo merged commit 0a28b20 into kian/correlation_omnibus Feb 17, 2025
3 checks passed
@knassre-bodo knassre-bodo deleted the kian/correlated_backref_2 branch February 17, 2025 20:28
knassre-bodo added a commit that referenced this pull request Feb 19, 2025
Resolves #141. See issue for more details. Child PRs deal with the components of the issue, ancillary changes, and additional bugfixes:
- #232
- #234 
- #251 
- #254 
- #272
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.

3 participants