tkhurana commented on code in PR #2353:
URL: https://github.com/apache/phoenix/pull/2353#discussion_r2729456707
##########
phoenix-core-client/src/main/java/org/apache/phoenix/filter/EmptyColumnOnlyFilter.java:
##########
@@ -80,7 +83,19 @@ public ReturnCode filterCell(final Cell cell) throws
IOException {
@Override
public void filterRowCells(List<Cell> kvs) throws IOException {
if (kvs.size() > 1) {
+ // remove the first cell and only return the empty column cell
kvs.remove(0);
+ } else if (kvs.size() == 1) {
+ // we only have 1 cell, check if it is the empty column cell or not
+ // since the empty column cell could have been excluded by another
filter like the
+ // DistinctPrefixFilter.
+ Cell cell = kvs.get(0);
+ if (found && !ScanUtil.isEmptyColumn(cell, emptyCF, emptyCQ)) {
Review Comment:
In case of DistinctPrefix filter when column encoding is disabled we end up
getting one cell (a non empty column cell) but `found` is also true. The
DistinctPrefix filter ignores the empty cell so this is how we end up in this
case where `kvs.size()=1` and `found` is true but the cell being returned is
not an empty column cell but some other cell.
--
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]