This repository was archived by the owner on Apr 1, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
refactor: Define CTE-related SQL nodes for emitter #2495
Merged
Merged
Changes from 24 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
6a1107e
refactor: Add cte factoring to new compiler
TrevorBergeron 97a5a7f
Merge remote-tracking branch 'github/main' into cte_extract2
TrevorBergeron 2d9dad5
Merge remote-tracking branch 'github/main' into cte_extract2
TrevorBergeron 10a9798
separate logical cte nodes from concrete sql ones
TrevorBergeron a5283f1
move extract_ctes later in compiler
TrevorBergeron 49ddfdf
fix _as_from_item helper
TrevorBergeron accf797
fix test issues and update snapshots
TrevorBergeron 1e62fd3
fix cte emitter
TrevorBergeron e60f3ed
dont create with expression without ctes
TrevorBergeron ce9fbb9
amend selection compilation
TrevorBergeron 74b2470
fix as_select star logic
TrevorBergeron 069dd09
fix isin join logic
TrevorBergeron 5f2ed0d
redo id remapper
TrevorBergeron 75e02cc
fix id issues preventing cte factoring
TrevorBergeron 2d382c6
refactor ir internals to reduce select count
TrevorBergeron 5717cfc
avoid more select stars
TrevorBergeron b7d360a
fix identifier tests
TrevorBergeron 10cf398
wrap more nodes in ctes
TrevorBergeron 28865fa
enable experimental compiler for tests
TrevorBergeron e6043dd
avoid rewrapping nodes, wrapping root
TrevorBergeron 8a5a96e
dont extract union all children as ctes
TrevorBergeron 64d5ce9
fix type, tmp test change
TrevorBergeron cd5579b
fix isin logic
TrevorBergeron 47a8af3
fix isin struct ics
TrevorBergeron dd39c51
fix isin w nulls
TrevorBergeron fecc37a
avoid TypedExpr warpping
TrevorBergeron 1a3d311
reset compiler to stable
TrevorBergeron e601d1b
appease mypy
TrevorBergeron File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we don't need to keep
exprasTypedExprbecause we only use the underlyingsqlglotexpression below. We can simplify this by definingsg_expr=sge.cast(expr.expr, "INT64")and using that directly instead to replaceexpr.expr.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done