AngersZhuuuu commented on a change in pull request #34848:
URL: https://github.com/apache/spark/pull/34848#discussion_r782681491



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/StringExpressionsSuite.scala
##########
@@ -1028,4 +1028,21 @@ class StringExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
     checkEvaluation(Contains(Literal("Spark SQL"), Literal("SQL")), true)
     checkEvaluation(Contains(Literal("Spark SQL"), Literal("k S")), true)
   }
+
+  test("SPARK-37582, SPARK-37583: CONTAINS, STARTSWITH, ENDSWITH should 
support binary type") {
+    checkEvaluation(Contains(Literal("Spark SQL"), Literal("Spark")), true)
+    checkEvaluation(Contains(Literal("Spark SQL".getBytes), Literal("Spark")), 
true)
+    checkEvaluation(Contains(Literal("Spark SQL"), Literal("Spark".getBytes)), 
true)

Review comment:
       `Literal("Spark".getBytes)` will create `BinaryType` then can check new 
method support `BinaryType`




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