v.21.7Improvement
Allow NOT IN Operator for Partition Pruning
Allow NOT IN operator to be used in partition pruning. #24894 (Amos Bird).Why it matters
This feature enables theNOT IN operator to be applied during partition pruning, improving query efficiency by excluding partitions based on values not included in a specified list. It helps reduce the amount of data scanned and speeds up query execution when filtering out unwanted partitions.How to use it
Use theNOT IN operator in the WHERE clause conditions that involve partition key columns to enable partition pruning based on negated membership. The query optimizer will automatically apply partition pruning using this filter.