本文整理了Java中org.apache.asterix.lang.common.statement.Query.accept
方法的一些代码示例,展示了Query.accept
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.accept
方法的具体详情如下:
包路径:org.apache.asterix.lang.common.statement.Query
类名称:Query
方法名:accept
暂无
代码示例来源:origin: apache/asterixdb
@Override
public Void visit(InsertStatement insert, Integer step) throws CompilationException {
out.print(skip(step) + "insert into " + datasetSymbol
+ generateFullName(insert.getDataverseName(), insert.getDatasetName()));
out.print("(");
insert.getQuery().accept(this, step + 2);
out.print(")");
out.println(SEMICOLON);
return null;
}
代码示例来源:origin: apache/asterixdb
@Override
public Void visit(InsertStatement insert, Integer step) throws CompilationException {
out.print(skip(step) + "insert into " + datasetSymbol
+ generateFullName(insert.getDataverseName(), insert.getDatasetName()) + "\n");
insert.getQuery().accept(this, step);
out.println(SEMICOLON);
return null;
}
代码示例来源:origin: apache/asterixdb
@Override
public Void visit(InsertStatement wc, Void arg) throws CompilationException {
wc.getQuery().accept(this, arg);
Expression returnExpression = wc.getReturnExpression();
if (returnExpression != null) {
returnExpression.accept(this, arg);
}
return null;
}
代码示例来源:origin: apache/asterixdb
@Override
public Void visit(InsertStatement insert, Integer step) throws CompilationException {
out.print(skip(step) + "insert into " + generateFullName(insert.getDataverseName(), insert.getDatasetName())
+ "\n");
insert.getQuery().accept(this, step);
out.println(SEMICOLON);
return null;
}
代码示例来源:origin: apache/asterixdb
@Override
public Expression visit(InsertStatement insertStatement, ILangExpression arg) throws CompilationException {
Expression returnExpr = insertStatement.getReturnExpression();
if (returnExpr != null) {
insertStatement.setReturnExpression(visit(returnExpr, arg));
}
Query bodyQuery = insertStatement.getQuery();
bodyQuery.accept(this, arg);
return null;
}
代码示例来源:origin: apache/asterixdb
/**
* Substitutes expression with replacement expressions according to the exprMap.
*
* @param expression
* ,
* an input expression.
* @param exprMap
* a map that maps expressions to their corresponding replacement expressions.
* @return an expression, where sub-expressions of the input expression (including the input expression itself)
* are replaced with deep copies with their mapped replacements in the exprMap if there exists such a
* replacement expression.
* @throws CompilationException
*/
public static Expression substituteExpression(Expression expression, Map<Expression, Expression> exprMap,
LangRewritingContext context) throws CompilationException {
if (exprMap.isEmpty()) {
return expression;
}
// Creates a wrapper query for the expression so that if the expression itself
// is the key, it can also be replaced.
Query wrapper = new Query(false);
wrapper.setSourceLocation(expression.getSourceLocation());
wrapper.setBody(expression);
// Creates a substitution visitor.
SqlppSubstituteExpressionVisitor visitor = new SqlppSubstituteExpressionVisitor(context, exprMap);
wrapper.accept(visitor, wrapper);
return wrapper.getBody();
}
}
代码示例来源:origin: apache/asterixdb
@Override
public Expression visit(InsertStatement insertStatement, ILangExpression arg) throws CompilationException {
scopeChecker.createNewScope();
// Visits the body query.
insertStatement.getQuery().accept(this, insertStatement);
// Registers the (inserted) data item variable.
VariableExpr bindingVar = insertStatement.getVar();
if (bindingVar != null) {
addNewVarSymbolToScope(scopeChecker.getCurrentScope(), bindingVar.getVar(), bindingVar.getSourceLocation());
}
// Visits the expression for the returning expression.
Expression returningExpr = insertStatement.getReturnExpression();
if (returningExpr != null) {
insertStatement.setReturnExpression(visit(returningExpr, insertStatement));
}
return null;
}
代码示例来源:origin: apache/asterixdb
Pair<ILogicalOperator, LogicalVariable> p = expr.accept(this, base);
ArrayList<Mutable<ILogicalOperator>> globalPlanRoots = new ArrayList<>();
ILogicalOperator topOp = p.first;
内容来源于网络,如有侵权,请联系作者删除!