SPARK-3711: Optimize the filter list in case of negative values as well