cgivre commented on code in PR #3000:
URL: https://github.com/apache/drill/pull/3000#discussion_r2203097759
##########
contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseRecordReader.java:
##########
@@ -84,13 +84,15 @@ public class HBaseRecordReader extends AbstractRecordReader
implements DrillHBas
private final Connection connection;
- public HBaseRecordReader(Connection connection,
HBaseSubScan.HBaseSubScanSpec subScanSpec, List<SchemaPath> projectedColumns) {
+ public HBaseRecordReader(Connection connection,
HBaseSubScan.HBaseSubScanSpec subScanSpec, List<SchemaPath> projectedColumns,
int maxRecords) {
this.connection = connection;
hbaseTableName = TableName.valueOf(
Preconditions.checkNotNull(subScanSpec, "HBase reader needs a sub-scan
spec").getTableName());
hbaseScan = new Scan(subScanSpec.getStartRow(), subScanSpec.getStopRow());
hbaseScanColumnsOnly = new Scan();
+ // Set the limit of rows for this scan. We will terminate the scan if the
number of returned rows reaches this value.
hbaseScan
+ .setLimit(maxRecords)
Review Comment:
I saw that you removed the logic to test whether the `maxRecords` is
defined. Does this still work if `maxRecords` is `0` or `null`?
--
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]