use of org.apache.calcite.schema.impl.ViewTable in project calcite by apache.
the class Smalls method str.
public static TranslatableTable str(Object o, Object p) {
assertThat(RexLiteral.validConstant(o, Litmus.THROW), is(true));
assertThat(RexLiteral.validConstant(p, Litmus.THROW), is(true));
return new ViewTable(Object.class, new RelProtoDataType() {
public RelDataType apply(RelDataTypeFactory typeFactory) {
return typeFactory.builder().add("c", SqlTypeName.VARCHAR, 100).build();
}
}, "values " + CalciteSqlDialect.DEFAULT.quoteStringLiteral(o.toString()) + ", " + CalciteSqlDialect.DEFAULT.quoteStringLiteral(p.toString()), ImmutableList.<String>of(), Arrays.asList("view"));
}
Aggregations