Jackie-Jiang commented on code in PR #9173:
URL: https://github.com/apache/pinot/pull/9173#discussion_r939448456
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/docidsets/SVScanDocIdSet.java:
##########
@@ -28,8 +28,12 @@ public final class SVScanDocIdSet implements
FilterBlockDocIdSet {
public SVScanDocIdSet(PredicateEvaluator predicateEvaluator, DataSource
dataSource, int numDocs,
boolean nullHandlingEnabled) {
- _docIdIterator = new SVScanDocIdIterator(predicateEvaluator,
dataSource.getForwardIndex(), numDocs,
- dataSource.getNullValueVector(), nullHandlingEnabled);
+ if (nullHandlingEnabled) {
+ _docIdIterator = new SVScanDocIdIterator(predicateEvaluator,
dataSource.getForwardIndex(), numDocs,
+ dataSource.getNullValueVector());
+ } else {
+ _docIdIterator = new SVScanDocIdIterator(predicateEvaluator,
dataSource.getForwardIndex(), numDocs);
+ }
Review Comment:
Suggest changing it to
```suggestion
NullValueVectorReader nullValueVector = nullHandlingEnabled ?
dataSource.getNullValueVector() : null;
_docIdIterator = new SVScanDocIdIterator(predicateEvaluator,
dataSource.getForwardIndex(), numDocs, nullValueVector);
```
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/dociditerators/SVScanDocIdIterator.java:
##########
@@ -49,14 +50,21 @@ public final class SVScanDocIdIterator implements
ScanBasedDocIdIterator {
private int _nextDocId = 0;
private long _numEntriesScanned = 0L;
+ public SVScanDocIdIterator(PredicateEvaluator predicateEvaluator,
ForwardIndexReader reader, int numDocs) {
Review Comment:
Remove this constructor, see the other comment for details
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]