use of io.confluent.ksql.schema.ksql.PersistenceSchema in project ksql by confluentinc.
the class KafkaSerdeFactoryTest method shouldThrowIfDecimal.
@Test
public void shouldThrowIfDecimal() {
// Given:
final PersistenceSchema schema = schemaWithFieldOfType(SqlTypes.decimal(1, 1));
// When:
final Exception e = assertThrows(KsqlException.class, () -> KafkaSerdeFactory.createSerde(schema));
// Then:
assertThat(e.getMessage(), containsString("The 'KAFKA' format does not support type 'DECIMAL'"));
}
use of io.confluent.ksql.schema.ksql.PersistenceSchema in project ksql by confluentinc.
the class KafkaSerdeFactoryTest method shouldThrowIfMap.
@Test
public void shouldThrowIfMap() {
// Given:
final PersistenceSchema schema = schemaWithFieldOfType(SqlTypes.map(SqlTypes.STRING, SqlTypes.STRING));
// When:
final Exception e = assertThrows(KsqlException.class, () -> KafkaSerdeFactory.createSerde(schema));
// Then:
assertThat(e.getMessage(), containsString("The 'KAFKA' format does not support type 'MAP'"));
}
use of io.confluent.ksql.schema.ksql.PersistenceSchema in project ksql by confluentinc.
the class KsqlDelimitedSerializerTest method givenSingleColumnSerializer.
private void givenSingleColumnSerializer(final SqlType columnType) {
final PersistenceSchema schema = givenSingleColumnPersistenceSchema(columnType);
serializer = new KsqlDelimitedSerializer(schema, CSV_FORMAT);
}
Aggregations