use of io.confluent.ksql.function.FunctionRegistry in project ksql by confluentinc.
the class SchemaKStreamTest method init.
@Before
public void init() {
functionRegistry = new FunctionRegistry();
ksqlStream = (KsqlStream) metaStore.getSource("TEST1");
StreamsBuilder builder = new StreamsBuilder();
kStream = builder.stream(ksqlStream.getKsqlTopic().getKafkaTopicName(), Consumed.with(Serdes.String(), ksqlStream.getKsqlTopic().getKsqlTopicSerDe().getGenericRowSerde(null, new KsqlConfig(Collections.emptyMap()), false, new MockSchemaRegistryClient())));
}
use of io.confluent.ksql.function.FunctionRegistry in project ksql by confluentinc.
the class SchemaKTableTest method init.
@Before
public void init() {
functionRegistry = new FunctionRegistry();
ksqlTable = (KsqlTable) metaStore.getSource("TEST2");
StreamsBuilder builder = new StreamsBuilder();
kTable = builder.table(ksqlTable.getKsqlTopic().getKafkaTopicName(), Consumed.with(Serdes.String(), ksqlTable.getKsqlTopic().getKsqlTopicSerDe().getGenericRowSerde(null, new KsqlConfig(Collections.emptyMap()), false, new MockSchemaRegistryClient())));
}
use of io.confluent.ksql.function.FunctionRegistry in project ksql by confluentinc.
the class SelectValueMapperTest method createExpressionMetadata.
private List<ExpressionMetadata> createExpressionMetadata(final List<Pair<String, Expression>> expressionPairList, final Schema schema) throws Exception {
final CodeGenRunner codeGenRunner = new CodeGenRunner(schema, new FunctionRegistry());
final List<ExpressionMetadata> expressionEvaluators = new ArrayList<>();
for (Pair<String, Expression> expressionPair : expressionPairList) {
final ExpressionMetadata expressionEvaluator = codeGenRunner.buildCodeGenFromParseTree(expressionPair.getRight());
expressionEvaluators.add(expressionEvaluator);
}
return expressionEvaluators;
}
use of io.confluent.ksql.function.FunctionRegistry in project ksql by confluentinc.
the class ExpressionTypeManagerTest method init.
@Before
public void init() {
metaStore = MetaStoreFixture.getNewMetaStore();
functionRegistry = new FunctionRegistry();
schema = SchemaBuilder.struct().field("TEST1.COL0", SchemaBuilder.INT64_SCHEMA).field("TEST1.COL1", SchemaBuilder.STRING_SCHEMA).field("TEST1.COL2", SchemaBuilder.STRING_SCHEMA).field("TEST1.COL3", SchemaBuilder.FLOAT64_SCHEMA);
}
use of io.confluent.ksql.function.FunctionRegistry in project ksql by confluentinc.
the class SqlPredicateTest method init.
@Before
public void init() {
metaStore = MetaStoreFixture.getNewMetaStore();
functionRegistry = new FunctionRegistry();
ksqlStream = (KsqlStream) metaStore.getSource("TEST1");
StreamsBuilder builder = new StreamsBuilder();
kStream = builder.stream(ksqlStream.getKsqlTopic().getKafkaTopicName(), Consumed.with(Serdes.String(), ksqlStream.getKsqlTopic().getKsqlTopicSerDe().getGenericRowSerde(null, new KsqlConfig(Collections.emptyMap()), false, new MockSchemaRegistryClient())));
}
Aggregations