use of io.dingodb.calcite.DingoParserContext in project dingo by dingodb.
the class TestDingoJobVisitor method setupAll.
@BeforeAll
public static void setupAll() {
parser = new DingoParser(new DingoParserContext());
table = parser.getContext().getCatalogReader().getTable(ImmutableList.of(FULL_TABLE_NAME));
RelOptCluster cluster = parser.getCluster();
RelDataTypeFactory typeFactory = parser.getContext().getTypeFactory();
RelDataType rowType = typeFactory.createStructType(ImmutableList.of(typeFactory.createSqlType(SqlTypeName.INTEGER), typeFactory.createSqlType(SqlTypeName.VARCHAR, 64), typeFactory.createSqlType(SqlTypeName.DOUBLE)), ImmutableList.of("id", "name", "amount"));
values = new DingoValues(cluster, rowType, ImmutableList.of(new Object[] { 1, "Alice", 1.0 }, new Object[] { 2, "Betty", 2.0 }), cluster.traitSetOf(DingoConventions.ROOT));
distributedValues = new DingoDistributedValues(cluster, rowType, values.getTuples(), cluster.traitSetOf(DingoConventions.DISTRIBUTED), table);
}
Aggregations