lirui-apache commented on a change in pull request #10318:
[FLINK-14721][hive]HiveTableSource implement LimitableTableSource interface
URL: https://github.com/apache/flink/pull/10318#discussion_r352448492
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveTableInputFormat.java
##########
@@ -206,6 +212,9 @@ public void close() throws IOException {
protected void fetchNext() throws IOException {
hasNext = this.recordReader.next(key, value);
+ if (limit > 0 && currentReadCount >= limit) {
Review comment:
Put this check before reading from `recordReader ` so that we don't actually
read any data once limit is reached?
----------------------------------------------------------------
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