takraj commented on code in PR #8452:
URL: https://github.com/apache/nifi/pull/8452#discussion_r1503868537
##########
nifi-nar-bundles/nifi-parquet-bundle/nifi-parquet-processors/src/main/java/org/apache/nifi/parquet/record/ParquetRecordReader.java:
##########
@@ -61,10 +61,13 @@ public ParquetRecordReader(
final Long offset =
Optional.ofNullable(variables.get(ParquetAttribute.RECORD_OFFSET))
.map(Long::parseLong)
.orElse(null);
+ final String recordCount =
variables.get(ParquetAttribute.RECORD_COUNT);
- recordsToRead =
Optional.ofNullable(variables.get(ParquetAttribute.RECORD_COUNT))
- .map(Long::parseLong)
- .orElse(null);
+ if (offset != null && recordCount != null) {
+ recordsToRead = Long.parseLong(recordCount);
+ } else {
+ recordsToRead = null;
+ }
Review Comment:
It is, because of the `final` modifier. Otherwise you get compile error.
--
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]