Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/13971#discussion_r69054154
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/generators.scala
---
@@ -115,9 +112,26 @@ case class Explode(child: Expression) extends
UnaryExpression with Generator wit
// hive-compatible default alias for explode function ("col" for array,
"key", "value" for map)
override def elementSchema: StructType = child.dataType match {
- case ArrayType(et, containsNull) => new StructType().add("col", et,
containsNull)
+ case ArrayType(et, containsNull) =>
+ if (position) {
--- End diff --
instead of using if here, I'd like to implement `elementSchema` in
`Explode` and `PosExplode `
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]