protected String getAliasId(String alias, QB qb) {
    return (qb.getId() == null ? alias : qb.getId() + ":" + alias).toLowerCase();
  }
Generates the sampling predicate from the TABLESAMPLE clause information.
This function uses the bucket column list to decide the expression inputs
to the predicate hash function in case useBucketCols is set to true,
otherwise the expression list stored in the TableSample is used. The bucket
columns of the table are used to generate this predicate in case no
expressions are provided on the TABLESAMPLE clause and the table has
clustering columns defined in it's metadata. The predicate created has the
following structure:

((hash(expressions) & Integer.MAX_VALUE) % denominator) == numerator

@param ts
         TABLESAMPLE clause information
@param bucketCols
         The clustering columns of the table
@param useBucketCols
         Flag to indicate whether the bucketCols should be used as input to
         the hash function
@param alias
         The alias used for the table in the row resolver
@param rwsch
         The row resolver used to resolve column references
@param planExpr
         The plan tree for the expression. If the user specified this, the
         parse expressions are not used
@return exprNodeDesc
@exception SemanticException
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java