924060929 commented on code in PR #66710:
URL: https://github.com/apache/doris/pull/66710#discussion_r3781249386


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/split/PluginDrivenSplit.java:
##########
@@ -68,6 +69,16 @@ public Object getInfo() {
         return null;
     }
 
+    @Override
+    public Optional<String> getFileAffinityKey() {
+        String fileFormat = connectorScanRange.getFileFormat();
+        boolean supportedFormat = "parquet".equalsIgnoreCase(fileFormat) || 
"orc".equalsIgnoreCase(fileFormat);
+        return isFileAffinitySupported() && 
connectorScanRange.isNativeReadRange() && supportedFormat
+                && getHosts().length == 0 && getFileLength() > getLength()
+                ? connectorScanRange.getPath().map(path -> 
LocationPath.of(path).getNormalizedLocation())

Review Comment:
   Fixed in cb60d15a463. `ConnectorScanRange#getPath()` is already the 
provider-supplied normalized physical path, while the one-argument 
`LocationPath.of()` keeps that same string and only reparses the URI. 
`PluginDrivenSplit#getFileAffinityKey()` now returns the existing path 
`Optional` directly, avoiding repeated URI parsing at each affinity lookup. 
Verified with `FederationBackendPolicyTest` (22/22).



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