-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[SPARK-49995][SQL] Add named argument support to more TVFs #48503
base: master
Are you sure you want to change the base?
Conversation
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.
Looks great!
1 a | ||
2 b | ||
""", | ||
since = "2.0.0", |
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.
Hmm I don't think we can use them as table functions since 2.0. SELECT * FROM inline(...)
is added recently (in spark 3.4 or 3.5)
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.
That's a good point. Now that we have separate definitions, we can maybe mention each of them in each definition.
Also the named arguments should be supported later than the tvfs were added, I guess? Do we have a way to mention about the updates?
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.
I guess this should be fine. Users will only see the updated usage for the function in the latest version.
@@ -665,6 +650,53 @@ case class VariantExplode(child: Expression) extends UnaryExpression with Genera | |||
} | |||
} | |||
|
|||
trait VariantExplodeGeneratorBuilderBase extends GeneratorBuilder { |
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.
cc @gene-db
What changes were proposed in this pull request?
Add named argument support to more TVFs.
Why are the changes needed?
The following TVFs should support named argument as same as
explode
:inline
posexplode
variant_explode
and their
_outer
variations.Does this PR introduce any user-facing change?
Yes, the above functions support named arguments.
How was this patch tested?
Added the related tests.
Was this patch authored or co-authored using generative AI tooling?
No.