-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23931][SQL] Adds arrays_zip function to sparksql #21045
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
Changes from 1 commit
7bf45dd
99848fe
27b0bc2
93826b6
a7e29f6
7130fec
d552216
1fecef4
f71151a
6b4bc94
1549928
9f7bba1
3ba2b4f
3a59201
6462fa8
8b1eb7c
2bfba80
c3b062c
d9b95c4
26bbf66
d9ad04d
f29ee1c
c58d09c
38fa996
5b3066b
759a4d4
68e69db
12b3835
643cb9b
5876082
0223960
2b88387
bbc20ee
8d3a838
d8f3dea
3d68ea9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: DylanGuedes <[email protected]>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -129,8 +129,10 @@ case class MapKeys(child: Expression) | |
| } | ||
|
|
||
| @ExpressionDescription( | ||
| usage = """_FUNC_(a1, a2, ...) - Returns a merged array containing in the N-th position the | ||
| N-th value of each array given.""", | ||
| usage = """ | ||
| _FUNC_(a1, a2, ...) - Returns a merged array containing in the N-th position the | ||
| N-th value of each array given. | ||
|
||
| """, | ||
| examples = """ | ||
| Examples: | ||
| > SELECT _FUNC_(array(1, 2, 3), array(2, 3, 4)); | ||
|
|
@@ -151,7 +153,7 @@ case class Zip(children: Seq[Expression]) extends Expression with ExpectsInputTy | |
|
|
||
| private lazy val arrayElementTypes = arrayTypes.map(_.elementType) | ||
|
||
|
|
||
| def mountSchema: StructType = { | ||
| private lazy val mountSchema: StructType = { | ||
| val fields = children.zip(arrayElementTypes).zipWithIndex.map { | ||
| case ((expr: NamedExpression, elementType), _) => | ||
| StructField(expr.name, elementType, nullable = true) | ||
|
|
||
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: columns of arrays to be merged.