spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cloud-fan <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-11590][SQL] use native json_tuple in la...
Date Mon, 09 Nov 2015 16:49:08 GMT
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9562#discussion_r44298131
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala ---
    @@ -749,10 +749,14 @@ class DataFrame private[sql](
           // will remove intermediate Alias for ExtractValue chain, and we need to alias
it again to
           // make it a NamedExpression.
           case Column(u: UnresolvedAttribute) => UnresolvedAlias(u)
    +
           case Column(expr: NamedExpression) => expr
    -      // Leave an unaliased explode with an empty list of names since the analyzer will
generate the
    -      // correct defaults after the nested expression's type has been resolved.
    +
    +      // Leave an unaliased generator with an empty list of names since the analyzer
will generate
    +      // the correct defaults after the nested expression's type has been resolved.
           case Column(explode: Explode) => MultiAlias(explode, Nil)
    +      case Column(jt: JsonTuple) => MultiAlias(jt, Nil)
    --- End diff --
    
    Note that we can NOT use json_tuple in `selectExpr` because the alias will be wrong. Since
`explode` has the same problem, we should fix it in another PR.


---
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


Mime
View raw message