[ 
https://issues.apache.org/jira/browse/DRILL-8528?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18004916#comment-18004916
 ] 

ASF GitHub Bot commented on DRILL-8528:
---------------------------------------

shfshihuafeng commented on code in PR #3000:
URL: https://github.com/apache/drill/pull/3000#discussion_r2203152411


##########
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:
   1.you can see as following unit test for maxRecords is 0. 
   
   
`"org.apache.drill.hbase.TestHBaseFilterPushDown#testLimitPushDownWithSpecial".`
   
     2.The default value of maxRecords  is -1,
       I think other test cases without limits can verify the scenario of 
maxRecords  =-1
   
   
   





> Hbase Limit PushDown
> --------------------
>
>                 Key: DRILL-8528
>                 URL: https://issues.apache.org/jira/browse/DRILL-8528
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Storage - HBase
>    Affects Versions: 1.23.0
>            Reporter: shihuafeng
>            Priority: Major
>             Fix For: 1.23.0
>
>
> Hbase limit pushdown



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to