[SPARK-2658][SQL] Add rule for true = 1.