Search in sources :

Example 26 with InputFactory

use of io.crate.expression.InputFactory 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);
}
Also used : InputFactory(io.crate.expression.InputFactory) DocTableInfo(io.crate.metadata.doc.DocTableInfo) RelationName(io.crate.metadata.RelationName) DocTableRelation(io.crate.analyze.relations.DocTableRelation) SqlExpressions(io.crate.testing.SqlExpressions) Before(org.junit.Before)

Aggregations

InputFactory (io.crate.expression.InputFactory)26 Symbol (io.crate.expression.symbol.Symbol)13 ArrayList (java.util.ArrayList)13 Before (org.junit.Before)10 RamAccounting (io.crate.breaker.RamAccounting)8 Input (io.crate.data.Input)8 NodeContext (io.crate.metadata.NodeContext)8 Test (org.junit.Test)8 Row (io.crate.data.Row)7 OrderBy (io.crate.analyze.OrderBy)6 BatchIterator (io.crate.data.BatchIterator)6 CollectExpression (io.crate.execution.engine.collect.CollectExpression)6 Reference (io.crate.metadata.Reference)6 DocTableInfo (io.crate.metadata.doc.DocTableInfo)6 Nullable (javax.annotation.Nullable)6 InMemoryBatchIterator (io.crate.data.InMemoryBatchIterator)5 SENTINEL (io.crate.data.SentinelRow.SENTINEL)5 NodeLimits (io.crate.execution.jobs.NodeLimits)5 InputColumn (io.crate.expression.symbol.InputColumn)5 Functions (io.crate.metadata.Functions)5