kazuyukitanimura commented on code in PR #478:
URL: https://github.com/apache/datafusion-comet/pull/478#discussion_r1617851614
##########
spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala:
##########
@@ -578,6 +578,24 @@ class CometExpressionSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
}
}
+ test("like with custom escape") {
+ val table = "names"
+ withTable(table) {
+ sql(s"create table $table(id int, name varchar(20)) using parquet")
+ sql(s"insert into $table values(1,'James Smith')")
+ sql(s"insert into $table values(2,'Michael_Rose')")
+ sql(s"insert into $table values(3,'Robert_R_Williams')")
+
+ // Filter column having values that include underscores
+ val queryDefaultEscape = sql("select id from names where name like
'%\\_%'")
+ checkAnswer(queryDefaultEscape, Row(2) :: Row(3) :: Nil)
Review Comment:
Strictly speaking, `checkSparkAnswerAndOperator()` to be used to make sure
native comet is actually executed?
--
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]