use of io.crate.analyze.relations.DocTableRelation in project crate by crate.
the class ScalarTestCase method prepareFunctions.
@Before
public void prepareFunctions() {
String createTableStmt = "create table doc.users (" + " id int," + " name text," + " tags array(text)," + " age int," + " a int," + " ip ip," + " c char," + " x bigint," + " shape geo_shape," + " timestamp_tz timestamp with time zone," + " timestamp timestamp without time zone," + " timezone text," + " interval text," + " time_format text," + " long_array array(bigint)," + " int_array array(int)," + " short_array array(short)," + " double_array array(double precision)," + " regex_pattern text," + " geoshape geo_shape," + " geopoint geo_point," + " geostring text," + " is_awesome boolean," + " double_val double precision," + " float_val real," + " short_val smallint," + " obj object," + " obj_ignored object(ignored)" + ")";
DocTableInfo tableInfo = SQLExecutor.tableInfo(new RelationName(DocSchemaInfo.NAME, "users"), createTableStmt, clusterService);
DocTableRelation tableRelation = new DocTableRelation(tableInfo);
tableSources = Map.of(tableInfo.ident(), tableRelation);
sqlExpressions = new SqlExpressions(tableSources);
inputFactory = new InputFactory(sqlExpressions.nodeCtx);
}
Aggregations