beliefer opened a new pull request, #50379:
URL: https://github.com/apache/spark/pull/50379

   ### What changes were proposed in this pull request?
   This PR aims to improve the `ExpressionsSchemaSuite`.
   
   
   ### Why are the changes needed?
   As time passes, we can register the expression builders into 
`FunctionRegistry`, such as: `MinuteExpressionBuilder`.
   The change causes `ExpressionsSchemaSuite` works not well due to it just 
compares the schema and sql. We should add the support to compare expression 
name.
   
   In addition to, I fix some english grammar errors and make them more clearly.
   
   
   ### Does this PR introduce _any_ user-facing change?
   'No'.
   Just update tests.
   
   
   ### How was this patch tested?
   GA and manual tests.
   Without https://github.com/apache/spark/pull/50361, developers could see the 
error show below.
   ```
   [info] ExpressionsSchemaSuite:
   10:51:51.174 WARN org.apache.hadoop.util.NativeCodeLoader: Unable to load 
native-hadoop library for your platform... using builtin-java classes where 
applicable
   [info] - Check schemas for expression examples *** FAILED *** (1 second, 650 
milliseconds)
   [info]   "...t.expressions.Minute[]" did not equal 
"...t.expressions.Minute[ExpressionBuilder]" The expected class name 
org.apache.spark.sql.catalyst.expressions.Minute does not match the output 
class name org.apache.spark.sql.catalyst.expressions.MinuteExpressionBuilder 
(ExpressionsSchemaSuite.scala:190)
   [info]   Analysis:
   [info]   "...t.expressions.Minute[]" -> 
"...t.expressions.Minute[ExpressionBuilder]"
   [info]   org.scalatest.exceptions.TestFailedException:
   [info]   at 
org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:472)
   [info]   at 
org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:471)
   [info]   at 
org.scalatest.Assertions$.newAssertionFailedException(Assertions.scala:1231)
   [info]   at 
org.scalatest.Assertions$AssertionsHelper.macroAssert(Assertions.scala:1295)
   [info]   at 
org.apache.spark.sql.ExpressionsSchemaSuite.$anonfun$new$12(ExpressionsSchemaSuite.scala:190)
   [info]   at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:619)
   [info]   at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:617)
   [info]   at scala.collection.AbstractIterable.foreach(Iterable.scala:935)
   [info]   at 
org.apache.spark.sql.ExpressionsSchemaSuite.$anonfun$new$1(ExpressionsSchemaSuite.scala:189)
   ```
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   'No'.
   


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

Reply via email to