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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]