gideonkorir commented on a change in pull request #3509: NIFI-6295 fix
deserialization issues with NiFiRecordSerDe for hive3streaming
URL: https://github.com/apache/nifi/pull/3509#discussion_r313985438
##########
File path:
nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/hive/streaming/NiFiRecordSerDe.java
##########
@@ -187,132 +202,127 @@ private Object extractCurrentField(Record record,
RecordField field, TypeInfo fi
}
switch (primitiveCategory) {
case BYTE:
- Integer bIntValue = record.getAsInt(fieldName);
- val = bIntValue == null ? null : bIntValue.byteValue();
+ Integer bIntValue =
DataTypeUtils.toInteger(fieldValue, field.getDataType().getFormat());
Review comment:
[AvroTypeUtil](https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-extension-utils/nifi-record-utils/nifi-avro-record-utils/src/main/java/org/apache/nifi/avro/AvroTypeUtil.java)
does seem to use `DataTypeUtil` rather than use the interface directly so was
following that and not assuming the `MapRecord` implementation.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services