Repository navigation
Use default CTE name when name is None - #150
Open
terencehonles wants to merge 1 commit into
Open
terencehonles wants to merge 1 commit into
terencehonles wants to merge 1 commit into
Conversation
terencehonles
force-pushed
the
use-default-cte-name-on-None
branch
from
October 6, 2026 15:47
594e2ba to
b8ff8bd
Compare
terencehonles
force-pushed
the
use-default-cte-name-on-None
branch
from
October 9, 2026 12:41
b8ff8bd to
f5e90ac
Compare
NoneNone
terencehonles
marked this pull request as ready for review
October 9, 2026 13:52
millerdev
reviewed
Oct 9, 2026
millerdev
left a comment
Contributor
There was a problem hiding this comment.
I don't think this change is worth it. If a wrapper cannot pass **kwargs through from the caller, possibly including a custom name, it can supply its own default CTE name. The default CTE name is arbitrary and has no special meaning.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change moves the default CTE name ("cte") into the initializer. In addition to
None, this also handles an empty CTE name.Pulled out of #142
The rationale for this change mainly revolves around functions who wrap
CTE. This is particularly focused on wrappers who use another name for the keyword argument and/or use Python typing. In either case you have to either specify the default CTE name or special case the call so you can omit the CTE name.The following code would be simplified with this change:
could instead be:
In the future, it seems like the CTE names could be auto generated if not provided, and using
Noneas a sentinel is easier to detect than comparing to the default name "cte" or any other names that wrappers have provided as their own defaults (they don't have to use "cte").