Open devinrsmith opened 1 week ago
In the meantime, a workaround like
static final CHANNEL_ID_SCHEMA = Schema.createEnum("ChannelId", null, "com.example", List.of("EMAIL", "TEXT"))
...
table = table.updateView("channel_id = new org.apache.avro.generic.GenericData.EnumSymbol(CHANNEL_ID_SCHEMA, channel_id)")
has been verified to work.
There's an asymmetry right now between avro kafka consume and produce, such that we can read in an enum, but we can't write out an enum. When we read in the enum, it is read in as a String; when we try and write it out as a String, and we get an error that looks something like:
It seems like we would need to use
org.apache.avro.generic.GenericData.EnumSymbol
to properly write out this value. It may be possible that the end-user can call this from their query formula as a workaround until DHC has proper backend support for this, but that may be tricky (user needs to have Schema).