kadirozde commented on code in PR #2353:
URL: https://github.com/apache/phoenix/pull/2353#discussion_r2722317130


##########
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:
   Does this really happen in ITs or is it just a defensive coding?



##########
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) {

Review Comment:
   We expect that the list size is either 1 or 2. If it is more than 2, we 
should catch it. I suggest we should log an error for that.



-- 
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]

Reply via email to