-
Notifications
You must be signed in to change notification settings - Fork 169
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
feat: Support GetArrayStructFields
expression
#993
Conversation
GetArrayStructFields
expression
GetArrayStructFields
expressionGetArrayStructFields
expression
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #993 +/- ##
=============================================
+ Coverage 34.03% 54.84% +20.81%
+ Complexity 875 858 -17
=============================================
Files 112 109 -3
Lines 43289 10841 -32448
Branches 9572 2101 -7471
=============================================
- Hits 14734 5946 -8788
+ Misses 25521 3821 -21700
+ Partials 3034 1074 -1960
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -2542,6 +2542,25 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde with CometExprShim | |||
None | |||
} | |||
|
|||
case GetArrayStructFields(child, _, ordinal, _, _) => |
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.
To help other reviewers, here is Spark's definition of GetArrayStructFields
:
case class GetArrayStructFields(
child: Expression,
field: StructField,
ordinal: Int,
numFields: Int,
containsNull: Boolean)
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.
Yeah those other three fields aren't relevant for actual execution
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.
LGTM. Thanks @Kimahriman
Which issue does this PR close?
Closes #992
Rationale for this change
Support the last complex type extractor for arrays and structs.
What changes are included in this PR?
Adds support for the
GetArrayStructFields
expression in Spark which extracts a nested struct field of an array of structs as an array of the inner field type.How are these changes tested?
New expression UT.