gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-23 01:11:05 30 4
gpt4 key购买 nike

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

Window.<init>介绍

暂无

代码示例

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

@Override
public Node visitOver(SqlBaseParser.OverContext context)
{
  Optional<OrderBy> orderBy = Optional.empty();
  if (context.ORDER() != null) {
    orderBy = Optional.of(new OrderBy(getLocation(context.ORDER()), visit(context.sortItem(), SortItem.class)));
  }
  return new Window(
      getLocation(context),
      visit(context.partition, Expression.class),
      orderBy,
      visitIfPresent(context.windowFrame(), WindowFrame.class));
}

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

ExpectedValueProvider<WindowNode.Specification> specificationAB = specification(ImmutableList.of(columnAAlias, columnBAlias), ImmutableList.of(), ImmutableMap.of());
Optional<Window> windowAB = Optional.of(new Window(ImmutableList.of(new SymbolReference("a"), new SymbolReference("b")), Optional.empty(), Optional.empty()));
Optional<Window> windowA = Optional.of(new Window(ImmutableList.of(new SymbolReference("a")), Optional.empty(), Optional.empty()));

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

@Test
  public void dependentWindowsAreNotReordered()
  {
    Optional<Window> windowA = Optional.of(new Window(ImmutableList.of(new SymbolReference("a")), Optional.empty(), Optional.empty()));

    tester().assertThat(new GatherAndMergeWindows.SwapAdjacentWindowsBySpecifications(0))
        .on(p ->
            p.window(new WindowNode.Specification(
                    ImmutableList.of(p.symbol("a")),
                    Optional.empty()),
                ImmutableMap.of(p.symbol("avg_1"),
                    new WindowNode.Function(new FunctionCall(QualifiedName.of("avg"), windowA, false, ImmutableList.of(new SymbolReference("avg_2"))), signature, frame)),
                p.window(new WindowNode.Specification(
                        ImmutableList.of(p.symbol("a"), p.symbol("b")),
                        Optional.empty()),
                    ImmutableMap.of(p.symbol("avg_2"),
                        new WindowNode.Function(new FunctionCall(QualifiedName.of("avg"), windowA, false, ImmutableList.of(new SymbolReference("a"))), signature, frame)),
                    p.values(p.symbol("a"), p.symbol("b")))))
        .doesNotFire();
  }
}

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

@Override
public Node visitOver(SqlBaseParser.OverContext context)
{
  Optional<OrderBy> orderBy = Optional.empty();
  if (context.ORDER() != null) {
    orderBy = Optional.of(new OrderBy(getLocation(context.ORDER()), visit(context.sortItem(), SortItem.class)));
  }
  return new Window(
      getLocation(context),
      visit(context.partition, Expression.class),
      orderBy,
      visitIfPresent(context.windowFrame(), WindowFrame.class));
}

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

@Override
public Node visitOver(SqlBaseParser.OverContext context)
{
  return new Window(
      getLocation(context),
      visit(context.partition, Expression.class),
      visit(context.sortItem(), SortItem.class),
      visitIfPresent(context.windowFrame(), WindowFrame.class));
}

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com