org.apache.asterix.lang.common.statement.Query.setTopLevel()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中org.apache.asterix.lang.common.statement.Query.setTopLevel方法的一些代码示例,展示了Query.setTopLevel的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setTopLevel方法的具体详情如下:
包路径:org.apache.asterix.lang.common.statement.Query
类名称:Query
方法名:setTopLevel

Query.setTopLevel介绍

暂无

代码示例

代码示例来源:origin: apache/asterixdb

var = ExpressionToVariableUtil.getGeneratedVariable(query.getBody(), true);
query.setTopLevel(true);
UpsertStatement stmt = new UpsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(),
 var, returnExpression);

代码示例来源:origin: apache/asterixdb

private Expression rewriteFunctionBody(FunctionDecl fnDecl) throws CompilationException {
  SourceLocation sourceLoc = fnDecl.getSourceLocation();
  Query wrappedQuery = new Query(false);
  wrappedQuery.setSourceLocation(sourceLoc);
  wrappedQuery.setBody(fnDecl.getFuncBody());
  wrappedQuery.setTopLevel(false);
  String fnNamespace = fnDecl.getSignature().getNamespace();
  Dataverse defaultDataverse = metadataProvider.getDefaultDataverse();
  Dataverse fnDataverse;
  if (fnNamespace == null || fnNamespace.equals(defaultDataverse.getDataverseName())) {
    fnDataverse = defaultDataverse;
  } else {
    try {
      fnDataverse = metadataProvider.findDataverse(fnNamespace);
    } catch (AlgebricksException e) {
      throw new CompilationException(ErrorCode.UNKNOWN_DATAVERSE, e, sourceLoc, fnNamespace);
    }
  }
  metadataProvider.setDefaultDataverse(fnDataverse);
  try {
    IQueryRewriter queryRewriter = rewriterFactory.createQueryRewriter();
    queryRewriter.rewrite(declaredFunctions, wrappedQuery, metadataProvider, context, true,
        fnDecl.getParamList());
    return wrappedQuery.getBody();
  } finally {
    metadataProvider.setDefaultDataverse(defaultDataverse);
  }
}

代码示例来源:origin: apache/asterixdb

var = ExpressionToVariableUtil.getGeneratedVariable(query.getBody(), true);
query.setTopLevel(true);
InsertStatement stmt = new InsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(),
 var, returnExpression);

代码示例来源:origin: apache/asterixdb

query.setTopLevel(true);
{if (true) return new InsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(), var,
              returnExpression);}

代码示例来源:origin: apache/asterixdb

query.setTopLevel(true);
{if (true) return new UpsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(), var,
              returnExpression);}

代码示例来源:origin: apache/asterixdb

query.setTopLevel(true);
{if (true) return new InsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(), var,
              returnExpression);}

代码示例来源:origin: apache/asterixdb

query.setTopLevel(true);
{if (true) return new UpsertStatement(nameComponents.first, nameComponents.second, query, getVarCounter(), var,
              returnExpression);}

代码示例来源:origin: apache/asterixdb

wrappedQuery.setSourceLocation(sourceLoc);
wrappedQuery.setBody(cfs.getFunctionBodyExpression());
wrappedQuery.setTopLevel(false);
List<VarIdentifier> paramVars = new ArrayList<>();
for (String v : cfs.getParamList()) {

相关文章