optimize filter condition in spark sql
minor fix