Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[SPARK-16850][SQL] Improve type checking error message for greatest/l…
…east
  • Loading branch information
petermaxlee committed Aug 2, 2016
commit 1043df4223052d4629f5f46a88ca2104bf6edb19
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ case class Least(children: Seq[Expression]) extends Expression {
} else if (children.map(_.dataType).distinct.count(_ != NullType) > 1) {
TypeCheckResult.TypeCheckFailure(
s"The expressions should all have the same type," +
s" got LEAST (${children.map(_.dataType)}).")
s" got LEAST(${children.map(_.dataType.simpleString).mkString(", ")}).")
} else {
TypeUtils.checkForOrderingExpr(dataType, "function " + prettyName)
}
Expand Down Expand Up @@ -359,7 +359,7 @@ case class Greatest(children: Seq[Expression]) extends Expression {
} else if (children.map(_.dataType).distinct.count(_ != NullType) > 1) {
TypeCheckResult.TypeCheckFailure(
s"The expressions should all have the same type," +
s" got GREATEST (${children.map(_.dataType)}).")
s" got GREATEST(${children.map(_.dataType.simpleString).mkString(", ")}).")
} else {
TypeUtils.checkForOrderingExpr(dataType, "function " + prettyName)
}
Expand Down