The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

Fails on writing nulls to Binary fields in User Defined Parser

We have a Vertica UDP class which parses input from Kafka and writes the output to a Vertica table. One of the columns in this table is a BINARY type that allows NULLS (see [1] below). Inserting nulls into this table via SQL works just fine [2]. However, when trying to insert nulls via the UDP, it fails with the below exception.

, exception: com.vertica.sdk.TypeCoercionException: Object of type <null> cannot be coerced to Binary(4) (Unsupported target type), exception stack:[com.vertica.sdk.NullTypeCoercion.unsupportedType(, com.vertica.sdk.NullTypeCoercion.asBinaryBytes(, com.vertica.sdk.PartitionWriter.setValue(, com.vertica.sdk.PartitionWriter.setRowFromMap(, com.vertica.sdk.PartitionWriter.setRowFromMap(,

Does Vertica Java API support Null type coercion for Binary types? I could not glean any information from your docs on this.

Thanks in advance


[1] create table test_binary( bin_field BINARY(4));
[2] insert into test_binary (bin_field) VALUES(NULL);

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file