awelless commented on code in PR #11115:
URL: https://github.com/apache/nifi/pull/11115#discussion_r3056890289
##########
nifi-commons/nifi-record-path/src/main/java/org/apache/nifi/record/path/functions/Format.java:
##########
@@ -82,7 +84,8 @@ public Stream<FieldValue> evaluate(final
RecordPathEvaluationContext context) {
final ZonedDateTime dateTime = instant.atZone(zoneId);
final String formatted =
dateTimeFormatter.format(dateTime);
- return new StandardFieldValue(formatted, fv.getField(),
fv.getParent().orElse(null));
+ final RecordField stringField = new
RecordField(fv.getField().getFieldName(), RecordFieldType.STRING.getDataType());
Review Comment:
It makes sense to carry over original field aliases.
For nullability - I always set it to `false`. We [run formatting for
nun-nullable values
only](https://github.com/awelless/nifi/blob/cbba4a4bbf52782ea164f1c0edeed397f65c66e7/nifi-commons/nifi-record-path/src/main/java/org/apache/nifi/record/path/functions/Format.java#L59)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]