private RelNode genQualifyLogicalPlan(QB qb, RelNode srcRel) throws SemanticException {
      QBParseInfo qbp = getQBParseInfo(qb);
      String destClauseName = qbp.getClauseNames().iterator().next();
      ASTNode qualifyClause = qbp.getQualifyExprForClause(destClauseName);

      if (qualifyClause == null) {
        throw new SemanticException("Missing expression: qualify.");
      }

      ASTNode targetNode = (ASTNode) qualifyClause.getChild(0);
      return genFilterRelNode(qb, targetNode, srcRel, null, null, true);
    }
NOTE: there can only be one select caluse since we don't handle multi destination insert.
@param isAllColRefRewrite
         when it is true, it means that it is called from group by *, where we use
         genSelectLogicalPlan to rewrite *
@return RelNode: the select relnode RowResolver: i.e., originalRR, the RR after select when there is an order by.
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java