sanjeet006py commented on code in PR #2134:
URL: https://github.com/apache/phoenix/pull/2134#discussion_r2066985918


##########
phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/CompactionScanner.java:
##########
@@ -416,11 +417,32 @@ private void postProcessForConditionalTTL(List<Cell> 
result) {
         }
     }
 
+    private void determineEmptyCfCq(List<Cell> result) {
+        for (Cell cell : result) {
+            emptyCF = CellUtil.cloneFamily(cell);
+            if(ScanUtil.isEmptyColumn(cell, emptyCF, 
QueryConstants.EMPTY_COLUMN_BYTES)) {
+                emptyCQ = QueryConstants.EMPTY_COLUMN_BYTES;
+                emptyCFStore = true;
+                break;
+            } //Empty column is always encoded in FOUR_BYTE format, since it's 
a reserved qualifier. See EncodedColumnsUtil#isReservedColumnQualifier
+            else if(ScanUtil.isEmptyColumn(cell, emptyCF, 
QueryConstants.ENCODED_EMPTY_COLUMN_BYTES)) {
+                emptyCQ = QueryConstants.ENCODED_EMPTY_COLUMN_BYTES;
+                emptyCFStore = true;
+                break;
+            }
+        }
+    }
+
     @Override
     public boolean next(List<Cell> result) throws IOException {
         boolean hasMore = storeScanner.next(result);
         inputCellCount += result.size();
         if (!result.isEmpty()) {
+            // This will happen only during flushes as then we don't pass 
PTable object
+            // to determine emptyCF and emptyCQ
+            if (emptyCQ == EMPTY_BYTE_ARRAY) {
+                determineEmptyCfCq(result);

Review Comment:
   Yeah, will fix that. Thanks



-- 
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: issues-unsubscr...@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to