com.facebook.presto.sql.tree.With.<init>()方法的使用及代码示例

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

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

With.<init>介绍

暂无

代码示例

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

@Override
public Node visitWith(SqlBaseParser.WithContext context)
{
  return new With(getLocation(context), context.RECURSIVE() != null, visit(context.namedQuery(), WithQuery.class));
}

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

Query query = new Query(Optional.of(new With(false, ImmutableList.of(
    new WithQuery(identifier("t"),
        query(new Values(ImmutableList.of(new LongLiteral("1")))),

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

@Test
public void testWith()
{
  assertStatement("WITH a (t, u) AS (SELECT * FROM x), b AS (SELECT * FROM y) TABLE z",
      new Query(Optional.of(new With(false, ImmutableList.of(
          new WithQuery(identifier("a"), simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("x"))), Optional.of(ImmutableList.of(identifier("t"), identifier("u")))),
          new WithQuery(identifier("b"), simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("y"))), Optional.empty())))),
          new Table(QualifiedName.of("z")),
          Optional.empty(),
          Optional.empty()));
  assertStatement("WITH RECURSIVE a AS (SELECT * FROM x) TABLE y",
      new Query(Optional.of(new With(true, ImmutableList.of(
          new WithQuery(identifier("a"), simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("x"))), Optional.empty())))),
          new Table(QualifiedName.of("y")),
          Optional.empty(),
          Optional.empty()));
}

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

@Override
public Node visitWith(SqlBaseParser.WithContext context)
{
  return new With(getLocation(context), context.RECURSIVE() != null, visit(context.namedQuery(), WithQuery.class));
}

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

@Override
public Node visitWith(SqlBaseParser.WithContext context)
{
  return new With(getLocation(context), context.RECURSIVE() != null, visit(context.namedQuery(), WithQuery.class));
}

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

Query query = new Query(Optional.of(new With(false, ImmutableList.of(
    new WithQuery(identifier("t"),
        query(new Values(ImmutableList.of(new LongLiteral("1")))),

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

@Test
public void testWith()
{
  assertStatement("WITH a (t, u) AS (SELECT * FROM x), b AS (SELECT * FROM y) TABLE z",
      new Query(Optional.of(new With(false, ImmutableList.of(
          new WithQuery(identifier("a"), simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("x"))), Optional.of(ImmutableList.of(identifier("t"), identifier("u")))),
          new WithQuery(identifier("b"), simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("y"))), Optional.empty())))),
          new Table(QualifiedName.of("z")),
          Optional.empty(),
          Optional.empty()));
  assertStatement("WITH RECURSIVE a AS (SELECT * FROM x) TABLE y",
      new Query(Optional.of(new With(true, ImmutableList.of(
          new WithQuery(identifier("a"), simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("x"))), Optional.empty())))),
          new Table(QualifiedName.of("y")),
          Optional.empty(),
          Optional.empty()));
}

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

@Test
public void testWith()
    throws Exception
{
  assertStatement("WITH a (t, u) AS (SELECT * FROM x), b AS (SELECT * FROM y) TABLE z",
      new Query(Optional.of(new With(false, ImmutableList.of(
          new WithQuery("a", simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("x"))), ImmutableList.of("t", "u")),
          new WithQuery("b", simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("y"))), null)))),
          new Table(QualifiedName.of("z")),
          ImmutableList.of(),
          Optional.<String>empty(),
          Optional.<Approximate>empty()));
  assertStatement("WITH RECURSIVE a AS (SELECT * FROM x) TABLE y",
      new Query(Optional.of(new With(true, ImmutableList.of(
          new WithQuery("a", simpleQuery(selectList(new AllColumns()), table(QualifiedName.of("x"))), null)))),
          new Table(QualifiedName.of("y")),
          ImmutableList.of(),
          Optional.<String>empty(),
          Optional.<Approximate>empty()));
}

相关文章