It was JsonTreeReader.
Thanks,
Mike
On Mon, Jul 29, 2019 at 3:36 PM Mark Payne wrote:
> Mike,
>
> What Record Reader is being used here? The problem appears to be due to
> the Record Reader itself assigning that as the field type.
>
> I created a dummy unit test to verify the RecordPath stuff
Mike,
What Record Reader is being used here? The problem appears to be due to the
Record Reader itself assigning that as the field type.
I created a dummy unit test to verify the RecordPath stuff is correct:
@Test
public void testFromEmail() {
final List fields = new ArrayList<>();
Doesn't explain WHY it happened, but I was able to resolve it like this:
Optional _temp =
fieldValue.getParentRecord().get().getSchema().getField(fieldValue.getField().getFieldName());
RecordField _rf = _temp.get();
value = DataTypeUtils.convertType(value, _rf.getDataType(),
_rf.getFieldName());
I have a simple avro schema in a test case that looks like this:
{
"type": "record",
"name": "PersonRecord",
"fields": [
{ "name": "firstName", "type": "string" },
{ "name": "lastName", "type": "string" },
{ "name": "creationDateTime", "type": [ "null", "type":