[SPARK-2395][SQL] Optimize common LIKE patterns.

I think this is taken care of below with the if guard.