nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi] gideonkorir commented on a change in pull request #3509: NIFI-6295 fix deserialization issues with NiFiRecordSerDe for hive3streaming
Date Wed, 14 Aug 2019 17:08:38 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message