github-actions[bot] commented on code in PR #70321:
URL: https://github.com/apache/doris/pull/70321#discussion_r4489140690


##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergScanPlanProvider.java:
##########
@@ -1792,8 +1802,12 @@ private static OptionalLong 
livePositionDeleteRowCount(Table table, Snapshot sna
             try (ManifestReader<DeleteFile> reader = 
ManifestFiles.readDeleteManifest(
                     manifest, table.io(), table.specs())) {
                 for (DeleteFile delete : reader) {
-                    if (delete.keyMetadata() != null || delete.content() != 
FileContent.POSITION_DELETES
-                            || delete.recordCount() < 0) {
+                    // Netting delete counts happens before file-task 
planning. Keep the same early
+                    // encryption rejection here so COUNT cannot escape 
through the manifest shortcut.
+                    if (delete.keyMetadata() != null) {

Review Comment:
   [P2] Keep encrypted COUNT capability probing non-throwing and consistent
   
   `canServeMetadataOnlyCount()` directly calls `canProveCountFromManifests()`, 
so this new throw runs inside the boolean capability probe for an encrypted 
delete manifest and raises `COUNT_READ_UNAVAILABLE` instead of returning 
`false`. For encrypted data-only snapshots, the probe can still return `true` 
from manifest counters without inspecting `DataFile.keyMetadata()`, then 
`checkCountFileEncryption()` throws during the collapsed plan. Make the 
capability probe return false whenever per-file encryption is present (or 
otherwise handle it before advertising support) so COUNT admission and 
execution agree; add a mixed encrypted-data/delete capability regression.



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