You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by navis <gi...@git.apache.org> on 2015/11/02 01:16:17 UTC

[GitHub] spark pull request: [SPARK-9034] [SQL] Reflect field names defined...

Github user navis commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8456#discussion_r43590635
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala ---
    @@ -1119,7 +1119,8 @@ class DataFrame private[sql](
       def explode[A <: Product : TypeTag](input: Column*)(f: Row => TraversableOnce[A]): DataFrame = {
         val schema = ScalaReflection.schemaFor[A].dataType.asInstanceOf[StructType]
     
    -    val elementTypes = schema.toAttributes.map { attr => (attr.dataType, attr.nullable) }
    +    val elementTypes = schema.toAttributes.map {
    +      attr => (attr.dataType, attr.nullable, Some(attr.name)) }
    --- End diff --
    
    Done. Also changed generatorOutput to null in explode(string, string).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org