maropu commented on issue #21764:
URL: https://github.com/apache/spark/pull/21764#issuecomment-616865610


   Hi, @toderesa97. You can use it like this;
   ```
   scala> Seq("abc", "def").toDF("v").write.saveAsTable("t")
   scala> sql("SELECT * FROM t WHERE v LIKE '%bc'").explain()
   == Physical Plan ==
   *(1) Project [v#18]
   +- *(1) Filter (isnotnull(v#18) AND EndsWith(v#18, bc))
                                       ^^^^^^^^
      +- *(1) ColumnarToRow
         +- FileScan parquet default.t[v#18] ...
   
   scala> sql("SET 
spark.sql.optimizer.excludedRules=org.apache.spark.sql.catalyst.optimizer.LikeSimplification")
   
   scala> sql("SELECT * FROM t WHERE v LIKE '%bc'").explain()
   == Physical Plan ==
   *(1) Project [v#18]
   +- *(1) Filter (isnotnull(v#18) AND v#18 LIKE %bc)
                                            ^^^^
      +- *(1) ColumnarToRow
         +- FileScan parquet default.t[v#18] ...
   ```


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

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