com.facebook.presto.sql.tree.WithQuery.getName()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(128)

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

WithQuery.getName介绍

暂无

代码示例

代码示例来源:origin: prestodb/presto

while (queries.hasNext()) {
  WithQuery query = queries.next();
  append(indent, formatExpression(query.getName(), parameters));
  query.getColumnNames().ifPresent(columnNames -> appendAliasColumns(builder, columnNames));
  builder.append(" AS ");

代码示例来源:origin: prestodb/presto

process(query, withScopeBuilder.build());
String name = withQuery.getName().getValue().toLowerCase(ENGLISH);
if (withScopeBuilder.containsNamedQuery(name)) {
  throw new SemanticException(DUPLICATE_RELATION, withQuery, "WITH query name '%s' specified more than once", name);

代码示例来源:origin: rakam-io/rakam

while (queries.hasNext()) {
  WithQuery query = queries.next();
  append(indent, formatExpression(query.getName(), tableNameMapper, columnNameMapper, queryWithTables, escapeIdentifier));
  query.getColumnNames().ifPresent(columnNames -> appendAliasColumns(builder, columnNames));
  builder.append(" AS ");

代码示例来源:origin: rakam-io/rakam

with.getQueries().stream()
      .forEach(withQuery ->
          builder.put(withQuery.getName().getValue(), withQuery.getQuery().getLocation().orElse(null)));
  return builder.build();
}).orElse(null);

代码示例来源:origin: com.facebook.presto/presto-parser

while (queries.hasNext()) {
  WithQuery query = queries.next();
  append(indent, formatExpression(query.getName(), parameters));
  query.getColumnNames().ifPresent(columnNames -> appendAliasColumns(builder, columnNames));
  builder.append(" AS ");

代码示例来源:origin: uk.co.nichesolutions.presto/presto-parser

while (queries.hasNext()) {
  WithQuery query = queries.next();
  append(indent, query.getName());
  appendAliasColumns(builder, query.getColumnNames());
  builder.append(" AS ");

代码示例来源:origin: vqtran/EchoQuery

while (queries.hasNext()) {
  WithQuery query = queries.next();
  append(indent, query.getName());
  appendAliasColumns(builder, query.getColumnNames());
  builder.append(" AS ");

代码示例来源:origin: uk.co.nichesolutions.presto/presto-main

private void analyzeWith(Query node, AnalysisContext context)
{
  // analyze WITH clause
  if (!node.getWith().isPresent()) {
    return;
  }
  With with = node.getWith().get();
  if (with.isRecursive()) {
    throw new SemanticException(NOT_SUPPORTED, with, "Recursive WITH queries are not supported");
  }
  for (WithQuery withQuery : with.getQueries()) {
    if (withQuery.getColumnNames() != null && !withQuery.getColumnNames().isEmpty()) {
      throw new SemanticException(NOT_SUPPORTED, withQuery, "Column alias not supported in WITH queries");
    }
    Query query = withQuery.getQuery();
    process(query, context);
    String name = withQuery.getName();
    if (context.isNamedQueryDeclared(name)) {
      throw new SemanticException(DUPLICATE_RELATION, withQuery, "WITH query name '%s' specified more than once", name);
    }
    context.addNamedQuery(name, query);
  }
}

相关文章