hannahkamundson commented on code in PR #44336:
URL: https://github.com/apache/spark/pull/44336#discussion_r1433134058
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala:
##########
@@ -1300,14 +1301,16 @@ trait ComplexTypeMergingExpression extends Expression {
lazy val inputTypesForMerging: Seq[DataType] = children.map(_.dataType)
def dataTypeCheck: Unit = {
- require(
- inputTypesForMerging.nonEmpty,
- "The collection of input data types must not be empty.")
- require(
- TypeCoercion.haveSameType(inputTypesForMerging),
- "All input types must be the same except nullable, containsNull,
valueContainsNull flags. " +
- s"The expression is: $this. " +
- s"The input types found
are\n\t${inputTypesForMerging.mkString("\n\t")}.")
+ SparkException.require(
+ requirement = inputTypesForMerging.nonEmpty,
+ errorClass = "COMPLEX_EXPRESSION_UNSUPPORTED_INPUT.NO_INPUTS",
Review Comment:
I'm pretty sure they are public facing because they are called from things
like `Least`. I'll add tests
(edit: spelling)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]