Copilot commented on code in PR #61038:
URL: https://github.com/apache/doris/pull/61038#discussion_r2882694070


##########
fe/fe-core/src/main/java/org/apache/doris/qe/cache/RowBatchBuilder.java:
##########
@@ -154,48 +154,4 @@ public PartitionRange.PartitionKeyType 
getKeyFromRow(byte[] row, int index, Type
         }
         return key;
     }
-
-    /**
-     * Rowbatch split to Row
-     */
-    public InternalService.PUpdateCacheRequest 
buildPartitionUpdateRequest(String sql) {
-        if (updateRequest == null) {
-            updateRequest = InternalService.PUpdateCacheRequest.newBuilder()
-                    .setSqlKey(CacheProxy.getMd5(sql))
-                    
.setCacheType(InternalService.CacheType.PARTITION_CACHE).build();
-        }
-        HashMap<Long, List<byte[]>> partRowMap = new HashMap<>();
-        List<byte[]> partitionRowList;
-        PartitionRange.PartitionKeyType cacheKey;
-        for (byte[] row : rowList) {
-            cacheKey = getKeyFromRow(row, keyIndex, keyType);
-            if (!cachePartMap.containsKey(cacheKey.realValue())) {
-                LOG.info("cant find partition key {}", cacheKey.realValue());
-                continue;
-            }
-            if (!partRowMap.containsKey(cacheKey.realValue())) {
-                partitionRowList = Lists.newArrayList();
-                partitionRowList.add(row);
-                partRowMap.put(cacheKey.realValue(), partitionRowList);
-            } else {
-                partRowMap.get(cacheKey.realValue()).add(row);
-            }
-        }
-
-        for (HashMap.Entry<Long, List<byte[]>> entry : partRowMap.entrySet()) {
-            Long key = entry.getKey();
-            PartitionRange.PartitionSingle partition = cachePartMap.get(key);
-            partitionRowList = entry.getValue();
-            updateRequest = updateRequest.toBuilder()
-                    .addValues(InternalService.PCacheValue.newBuilder()
-                            .setParam(InternalService.PCacheParam.newBuilder()
-                                    .setPartitionKey(key)
-                                    
.setLastVersion(partition.getPartition().getVisibleVersion())
-                                    
.setLastVersionTime(partition.getPartition().getVisibleVersionTime())
-                                    .build()).setDataSize(dataSize).addAllRows(
-                                    
partitionRowList.stream().map(ByteString::copyFrom)
-                                            
.collect(Collectors.toList()))).build();
-        }
-        return updateRequest;
-    }
 }

Review Comment:
   `buildPartitionUpdateRequest()` was removed from `RowBatchBuilder`, but it 
is still referenced by `PartitionCache.updateCache()` (see 
`PartitionCache.java` calling 
`rowBatchBuilder.buildPartitionUpdateRequest(...)`). This will cause a 
compilation failure and also breaks partition cache update functionality. 
Either restore this method (updated to use `getCachedVisibleVersion()` as 
intended) or change `PartitionCache` to use the new/alternative update-request 
builder API.



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

Reply via email to