use of io.trino.plugin.hive.util.HiveBlockEncodingSerde in project trino by trinodb.
the class TestRecordingHiveMetastore method createJsonCodec.
private JsonCodec<HiveMetastoreRecording.Recording> createJsonCodec() {
ObjectMapperProvider objectMapperProvider = new ObjectMapperProvider();
TypeDeserializer typeDeserializer = new TypeDeserializer(new TestingTypeManager());
objectMapperProvider.setJsonDeserializers(ImmutableMap.of(Block.class, new TestingBlockJsonSerde.Deserializer(new HiveBlockEncodingSerde()), Type.class, typeDeserializer));
objectMapperProvider.setJsonSerializers(ImmutableMap.of(Block.class, new TestingBlockJsonSerde.Serializer(new HiveBlockEncodingSerde())));
JsonCodec<HiveMetastoreRecording.Recording> jsonCodec = new JsonCodecFactory(objectMapperProvider).jsonCodec(HiveMetastoreRecording.Recording.class);
return jsonCodec;
}
Aggregations