pingcap / pingcap/tidb

Do more optimization when do comparison with null values

Open
#38,199 1 comment 0 reactions 0 assignees View on GitHub
sig/planner type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement
Currently, TiDB only do optimization when doing equal comparsion with null values(such as `where a = null`), while when it comes to other comparsion(including >= | <= | != | > | < ) with null values, TiDB not do related optimization.

Considering everything compared with null is always null, we can do more optimization in these cases.

![img_v2_925c91f1-5285-44c0-a247-5af2747ee2fg](https://user-images.githubusercontent.com/26538495/192472133-026001be-7aac-49ce-a981-5a464a46a779.jpg)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.