本文整理了Java中com.facebook.presto.sql.tree.Union.<init>()
方法的一些代码示例,展示了Union.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Union.<init>()
方法的具体详情如下:
包路径:com.facebook.presto.sql.tree.Union
类名称:Union
方法名:<init>
暂无
代码示例来源:origin: prestodb/presto
@Test
public void testUnion()
{
assertStatement("SELECT 123 UNION DISTINCT SELECT 123 UNION ALL SELECT 123",
new Query(
Optional.empty(),
new Union(ImmutableList.of(
new Union(ImmutableList.of(createSelect123(), createSelect123()), true),
createSelect123()
), false),
Optional.empty(),
Optional.empty()));
}
代码示例来源:origin: prestodb/presto
@Override
public Node visitSetOperation(SqlBaseParser.SetOperationContext context)
{
QueryBody left = (QueryBody) visit(context.left);
QueryBody right = (QueryBody) visit(context.right);
boolean distinct = context.setQuantifier() == null || context.setQuantifier().DISTINCT() != null;
switch (context.operator.getType()) {
case SqlBaseLexer.UNION:
return new Union(getLocation(context.UNION()), ImmutableList.of(left, right), distinct);
case SqlBaseLexer.INTERSECT:
return new Intersect(getLocation(context.INTERSECT()), ImmutableList.of(left, right), distinct);
case SqlBaseLexer.EXCEPT:
return new Except(getLocation(context.EXCEPT()), left, right, distinct);
}
throw new IllegalArgumentException("Unsupported set operation: " + context.operator.getText());
}
代码示例来源:origin: stackoverflow.com
@Test
public void Test() throws Exception {
Union u = new Union("Sindacate", 80);
UnionController.add(u);
ServiceCharge charge1 =
new ServiceCharge(60,"service for employee","27/11/2016 20:35:00", u); // uncomment your parameter here that accepts Union class type.
ServiceController.add(charge1, u);
}
代码示例来源:origin: com.facebook.presto/presto-parser
@Test
public void testUnion()
{
assertStatement("SELECT 123 UNION DISTINCT SELECT 123 UNION ALL SELECT 123",
new Query(
Optional.empty(),
new Union(ImmutableList.of(
new Union(ImmutableList.of(createSelect123(), createSelect123()), true),
createSelect123()
), false),
Optional.empty(),
Optional.empty()));
}
代码示例来源:origin: uk.co.nichesolutions.presto/presto-parser
@Test
public void testUnion()
{
assertStatement("SELECT 123 UNION DISTINCT SELECT 123 UNION ALL SELECT 123",
new Query(
Optional.empty(),
new Union(ImmutableList.of(
new Union(ImmutableList.of(createSelect123(), createSelect123()), true),
createSelect123()
), false),
ImmutableList.<SortItem>of(),
Optional.empty(),
Optional.empty()));
}
代码示例来源:origin: com.facebook.presto/presto-parser
@Override
public Node visitSetOperation(SqlBaseParser.SetOperationContext context)
{
QueryBody left = (QueryBody) visit(context.left);
QueryBody right = (QueryBody) visit(context.right);
boolean distinct = context.setQuantifier() == null || context.setQuantifier().DISTINCT() != null;
switch (context.operator.getType()) {
case SqlBaseLexer.UNION:
return new Union(getLocation(context.UNION()), ImmutableList.of(left, right), distinct);
case SqlBaseLexer.INTERSECT:
return new Intersect(getLocation(context.INTERSECT()), ImmutableList.of(left, right), distinct);
case SqlBaseLexer.EXCEPT:
return new Except(getLocation(context.EXCEPT()), left, right, distinct);
}
throw new IllegalArgumentException("Unsupported set operation: " + context.operator.getText());
}
代码示例来源:origin: uk.co.nichesolutions.presto/presto-parser
@Override
public Node visitSetOperation(SqlBaseParser.SetOperationContext context)
{
QueryBody left = (QueryBody) visit(context.left);
QueryBody right = (QueryBody) visit(context.right);
boolean distinct = context.setQuantifier() == null || context.setQuantifier().DISTINCT() != null;
switch (context.operator.getType()) {
case SqlBaseLexer.UNION:
return new Union(getLocation(context.UNION()), ImmutableList.of(left, right), distinct);
case SqlBaseLexer.INTERSECT:
return new Intersect(getLocation(context.INTERSECT()), ImmutableList.of(left, right), distinct);
case SqlBaseLexer.EXCEPT:
return new Except(getLocation(context.EXCEPT()), left, right, distinct);
}
throw new IllegalArgumentException("Unsupported set operation: " + context.operator.getText());
}
内容来源于网络,如有侵权,请联系作者删除!