You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by maropu <gi...@git.apache.org> on 2017/05/28 09:19:28 UTC

[GitHub] spark pull request #18079: [SPARK-20841][SQL] Support table column aliases i...

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

    https://github.com/apache/spark/pull/18079#discussion_r118836800
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveTableValuedFunctions.scala ---
    @@ -131,8 +131,9 @@ object ResolveTableValuedFunctions extends Rule[LogicalPlan] {
             val outputAttrs = resolvedFunc.output
             // Checks if the number of the aliases is equal to expected one
             if (u.outputNames.size != outputAttrs.size) {
    -          u.failAnalysis(s"expected ${outputAttrs.size} columns but " +
    -            s"found ${u.outputNames.size} columns")
    +          u.failAnalysis(s"Number of given aliases does not match number of output columns. " +
    +            s"Function name: ${u.functionName}; number of aliases: " +
    +            s"${u.outputNames.size}; number of output columns: ${outputAttrs.size}.")
             }
    --- End diff --
    
    This fix is not related to this pr though, I modified along with this comment: https://github.com/apache/spark/pull/18079/files#diff-57b3d87be744b7d79a9beacf8e5e5eb2R604


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