Is your feature request related to a problem or challenge? Please describe what you are trying to do.
In functions like regexp_count we have definition like this:
def regexp_count(
string: Expr, pattern: Expr, start: Expr | None = None, flags: Expr | None = None
) -> Expr:
It is a common pattern that the pattern is a string, the start is an integer, and flags is a string (or single character).
It would be more pythonic if we can just pass those values without wrapping them in a lit() call.
Describe the solution you'd like
Review the regexp functions in the function library and find other common patterns.
For each allow users to not have to specify a Expr. We do this in other places in the code, so a pattern is already established.
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
In functions like
regexp_countwe have definition like this:It is a common pattern that the
patternis a string, thestartis an integer, andflagsis a string (or single character).It would be more pythonic if we can just pass those values without wrapping them in a
lit()call.Describe the solution you'd like
Review the regexp functions in the function library and find other common patterns.
For each allow users to not have to specify a Expr. We do this in other places in the code, so a pattern is already established.