code: func getUsableSetsByGreedy(nodes []*StatsNode) (newBlocks []*StatsNode) {
  	marked := make([]bool, len(nodes))
  	mask := int64(math.MaxInt64)
  	for {
  		// Choose the index that covers most.
  		bestID, bestCount, bestTp, bestNumCols, bestMask := -1, 0, ColType, 0, int64(0)
  		for i, set := range nodes {
  			if marked[i] {
  				continue
  			}
  			curMask := set.mask & mask
  			bits := popCount(curMask)
  			// This set cannot cover any thing, just skip it.
  			if bits == 0 {
  				continue
  			}
  			// We greedy select the stats info based on:
  			// (1): The stats type, always prefer the primary key or index.
  			// (2): The number of expression that it covers, the more the better.
  			// (3): The number of columns that it contains, the less the better.
  			if (bestTp == ColType && set.Tp != ColType) || bestCount < bits || (bestCount == bits && bestNumCols > set.numCols) {
  				bestID, bestCount, bestTp, bestNumCols, bestMask = i, bits, set.Tp, set.numCols, curMask
  			}
  		}
  		if bestCount == 0 {
  			break
  		}
  
  		// Update the mask, remove the bit that nodes[bestID].mask has.
  		mask &^= bestMask
  
  		newBlocks = append(newBlocks, nodes[bestID])
  		marked[bestID] = true
  	}
  	return
  }
docs: // getUsableSetsByGreedy will select the indices and pk used for calculate selectivity by greedy algorithm.