本文整理了Java中org.apache.hadoop.hive.ql.parse.QBParseInfo.getDistinctFuncExprsForClause
方法的一些代码示例,展示了QBParseInfo.getDistinctFuncExprsForClause
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QBParseInfo.getDistinctFuncExprsForClause
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.parse.QBParseInfo
类名称:QBParseInfo
方法名:getDistinctFuncExprsForClause
暂无
代码示例来源:origin: apache/hive
private boolean optimizeMapAggrGroupBy(String dest, QB qb) throws SemanticException {
List<ASTNode> grpByExprs = getGroupByForClause(qb.getParseInfo(), dest);
if ((grpByExprs != null) && !grpByExprs.isEmpty()) {
return false;
}
if (!qb.getParseInfo().getDistinctFuncExprsForClause(dest).isEmpty()) {
return false;
}
return true;
}
代码示例来源:origin: apache/drill
private boolean optimizeMapAggrGroupBy(String dest, QB qb) throws SemanticException {
List<ASTNode> grpByExprs = getGroupByForClause(qb.getParseInfo(), dest);
if ((grpByExprs != null) && !grpByExprs.isEmpty()) {
return false;
}
if (!qb.getParseInfo().getDistinctFuncExprsForClause(dest).isEmpty()) {
return false;
}
return true;
}
代码示例来源:origin: apache/hive
private List<ExprNodeDesc> getDistinctExprs(QBParseInfo qbp, String dest, RowResolver inputRR)
throws SemanticException {
List<ASTNode> distinctAggExprs = qbp.getDistinctFuncExprsForClause(dest);
List<ExprNodeDesc> distinctExprs = new ArrayList<ExprNodeDesc>();
for (ASTNode distinctAggExpr : distinctAggExprs) {
// 0 is function name
for (int i = 1; i < distinctAggExpr.getChildCount(); i++) {
ASTNode parameter = (ASTNode) distinctAggExpr.getChild(i);
ExprNodeDesc expr = genExprNodeDesc(parameter, inputRR);
if (ExprNodeDescUtils.indexOf(expr, distinctExprs) < 0) {
distinctExprs.add(expr);
}
}
}
return distinctExprs;
}
代码示例来源:origin: apache/drill
private List<ExprNodeDesc> getDistinctExprs(QBParseInfo qbp, String dest, RowResolver inputRR)
throws SemanticException {
List<ASTNode> distinctAggExprs = qbp.getDistinctFuncExprsForClause(dest);
List<ExprNodeDesc> distinctExprs = new ArrayList<ExprNodeDesc>();
for (ASTNode distinctAggExpr : distinctAggExprs) {
// 0 is function name
for (int i = 1; i < distinctAggExpr.getChildCount(); i++) {
ASTNode parameter = (ASTNode) distinctAggExpr.getChild(i);
ExprNodeDesc expr = genExprNodeDesc(parameter, inputRR);
if (ExprNodeDescUtils.indexOf(expr, distinctExprs) < 0) {
distinctExprs.add(expr);
}
}
}
return distinctExprs;
}
代码示例来源:origin: apache/hive
if (!parseInfo.getDistinctFuncExprsForClause(dest).isEmpty()) {
List<ASTNode> distFuncs = parseInfo.getDistinctFuncExprsForClause(dest);
String colName = getColumnInternalName(reduceKeys.size());
outputKeyColumnNames.add(colName);
代码示例来源:origin: apache/drill
if (!parseInfo.getDistinctFuncExprsForClause(dest).isEmpty()) {
List<ASTNode> distFuncs = parseInfo.getDistinctFuncExprsForClause(dest);
String colName = getColumnInternalName(reduceKeys.size());
outputKeyColumnNames.add(colName);
代码示例来源:origin: apache/hive
input,
grpByExprs,
(parseInfo.getDistinctFuncExprsForClause(dest).isEmpty() ? -1 : Integer.MAX_VALUE),
false,
-1,
代码示例来源:origin: apache/hive
parseInfo.getDistinctFuncExprsForClause(dest),
parseInfo.getAggregationExprsForClause(dest),
opParseCtx.get(inputOperatorInfo).getRowResolver());
boolean isDistinct = !qb.getParseInfo().getDistinctFuncExprsForClause(dest).isEmpty();
代码示例来源:origin: apache/hive
if (!parseInfo.getDistinctFuncExprsForClause(dest).isEmpty()) {
List<ASTNode> list = parseInfo.getDistinctFuncExprsForClause(dest);
for (ASTNode value : list) {
代码示例来源:origin: apache/hive
parseInfo.getDistinctFuncExprsForClause(dest),
parseInfo.getAggregationExprsForClause(dest),
opParseCtx.get(inputOperatorInfo).getRowResolver());
List<ASTNode> distinctFuncExprs = parseInfo.getDistinctFuncExprsForClause(dest);
代码示例来源:origin: apache/drill
input,
grpByExprs,
(parseInfo.getDistinctFuncExprsForClause(dest).isEmpty() ? -1 : Integer.MAX_VALUE),
false,
-1,
代码示例来源:origin: apache/drill
parseInfo.getDistinctFuncExprsForClause(dest),
parseInfo.getAggregationExprsForClause(dest),
opParseCtx.get(inputOperatorInfo).getRowResolver());
boolean isDistinct = !qb.getParseInfo().getDistinctFuncExprsForClause(dest).isEmpty();
代码示例来源:origin: apache/drill
if (!parseInfo.getDistinctFuncExprsForClause(dest).isEmpty()) {
List<ASTNode> list = parseInfo.getDistinctFuncExprsForClause(dest);
for (ASTNode value : list) {
代码示例来源:origin: apache/drill
parseInfo.getDistinctFuncExprsForClause(dest),
parseInfo.getAggregationExprsForClause(dest),
opParseCtx.get(inputOperatorInfo).getRowResolver());
List<ASTNode> distinctFuncExprs = parseInfo.getDistinctFuncExprsForClause(dest);
代码示例来源:origin: apache/hive
qbp.getDistinctFuncExprsForClause(dest).size() > 1) {
throw new SemanticException(ErrorMsg.UNSUPPORTED_MULTIPLE_DISTINCTS.
getMsg());
代码示例来源:origin: apache/hive
&& qbp.getDistinctFuncExprsForClause(detsClauseName).size() > 1) {
throw new SemanticException(ErrorMsg.UNSUPPORTED_MULTIPLE_DISTINCTS.getMsg());
.getDistinctFuncExprsForClause(detsClauseName), aggregationTrees,
this.relToHiveRR.get(srcRel));
代码示例来源:origin: apache/drill
qbp.getDistinctFuncExprsForClause(dest).size() > 1) {
throw new SemanticException(ErrorMsg.UNSUPPORTED_MULTIPLE_DISTINCTS.
getMsg());
代码示例来源:origin: apache/drill
&& qbp.getDistinctFuncExprsForClause(detsClauseName).size() > 1) {
throw new SemanticException(ErrorMsg.UNSUPPORTED_MULTIPLE_DISTINCTS.getMsg());
.getDistinctFuncExprsForClause(detsClauseName), aggregationTrees,
this.relToHiveRR.get(srcRel));
代码示例来源:origin: com.facebook.presto.hive/hive-apache
protected static boolean distinctExprsExists(QB qb) {
QBParseInfo qbp = qb.getParseInfo();
TreeSet<String> ks = new TreeSet<String>();
ks.addAll(qbp.getClauseNames());
for (String dest : ks) {
List<ASTNode> list = qbp.getDistinctFuncExprsForClause(dest);
if (!list.isEmpty()) {
return true;
}
}
return false;
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
private boolean optimizeMapAggrGroupBy(String dest, QB qb) {
List<ASTNode> grpByExprs = getGroupByForClause(qb.getParseInfo(), dest);
if ((grpByExprs != null) && !grpByExprs.isEmpty()) {
return false;
}
if (!qb.getParseInfo().getDistinctFuncExprsForClause(dest).isEmpty()) {
return false;
}
return true;
}
内容来源于网络,如有侵权,请联系作者删除!