fix sparksql use of predicates