OIiveirra commented on code in PR #69528:
URL: https://github.com/apache/doris/pull/69528#discussion_r4366829078


##########
fe/fe-core/src/main/java/org/apache/doris/tablefunction/LocalTableValuedFunction.java:
##########
@@ -135,6 +143,38 @@ private void getFileListFromBackend() throws 
AnalysisException {
         }
     }
 
+    /** Apply LOCAL admission to sinks that select the built-in local JNI 
writer as well. */
+    public static void checkSinkEnabled(String tvfName, Map<String, String> 
properties) {
+        String writerClass = properties.getOrDefault("writer_class", "");
+        // JNI consumes a C string, and ScannerLoader accepts slash-separated 
class names.
+        int nul = writerClass.indexOf('\0');
+        if (nul >= 0) {
+            writerClass = writerClass.substring(0, nul);
+        }
+        if ("local".equalsIgnoreCase(tvfName)

Review Comment:
   The delegated ViewFS variant is fixed in 
9df0508783e6b1da6be6ef9909de9ebc0db45db8. Native admission uses the actual 
generated file's parent; FE cleanup checks its actual parent directory. The raw 
and normalized checks follow the selected mount table and path-component link, 
including trailing-source slashes, authority/default table selection, fallback 
and multiple targets. Nested targets are checked before filesystem creation. 
Unused local mounts do not block an unambiguous remote route.
   
   Runtime-overloaded, regex, cyclic, inherited or ambiguous nested delegation 
requires the existing LOCAL startup opt-in instead of assuming the inline 
configuration proves remote storage. Enabled requests retain their existing 
Hadoop behavior.
   
   All 51 selected FE tests passed with fresh XML and unchanged sources, 
including INSERT/EXPLAIN, direct binding, resource-derived mounts, off/on and 
remote controls, and a global-LOAD command entry with cleanup enabled. 
Factory/executor mocks verify no side effect before rejection. No real 
directory deletion was executed; targeted Checkstyle passed.



##########
fe/fe-core/src/main/java/org/apache/doris/tablefunction/S3TableValuedFunction.java:
##########
@@ -89,6 +107,43 @@ public S3TableValuedFunction(Map<String, String> 
properties, List<TBrokerFileSta
     }
 
 
+    private static boolean isRemoteLanceUri(String path) {
+        try {
+            URI uri = new URI(path == null ? "" : path);

Review Comment:
   Fixed in 9df0508783e6b1da6be6ef9909de9ebc0db45db8 and mirrored to the 
existing 4.2 PR. The remote-Lance guard validates scheme/authority without 
applying java.net.URI's stricter path grammar to the full string. The SDK 
receives the original raw-space or percent-escaped path; malformed/signed ports 
and local aliases remain rejected.
   
   Pinned url 2.5.8 independently parses raw and escaped spaces as the same 
remote path, while rejecting the invalid-port controls. Passing FE tests verify 
exact metadata-loader requests through S3 and FILE, plus scan-range URI 
identity for both spellings. All 51 selected FE tests passed with fresh XML and 
unchanged sources. These are mocked FE metadata/range tests and a pinned URL 
probe; no real remote-service read is claimed.



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