planner: tiny refactor around check index (#11919)
planner: tiny refactor around check index (#11919)


kyle-wang/tidb,c4pt0r/tidb,ming-relax/tidb,ngaut/tidb,ngaut/tidb,c4pt0r/tidb,ngaut/tidb,qiuyesuifeng/tidb,kyle-wang/tidb,qiuyesuifeng/tidb,kyle-wang/tidb,pingcap/tidb,pingcap/tidb,c4pt0r/tidb,pingcap/tidb,kyle-wang/tidb,pingcap/tidb,coocood/tidb,EvilMcJerkface/tidb,ngaut/tidb,pingcap/tidb,Cofyc/tidb,ngaut/tidb,c4pt0r/tidb,pingcap/tidb,kyle-wang/tidb,c4pt0r/tidb,Cofyc/tidb,ming-relax/tidb,XuHuaiyu/tidb,EvilMcJerkface/tidb,kyle-wang/tidb,XuHuaiyu/tidb,c4pt0r/tidb,coocood/tidb,ngaut/tidb