OIiveirra commented on code in PR #69527:
URL: https://github.com/apache/doris/pull/69527#discussion_r4366573223
##########
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)
+ ||
"org.apache.doris.writer.LocalFileJniWriter".equals(writerClass.replace('/',
'.'))) {
Review Comment:
Fixed in e63cedce2b16fd8ab50f982b2e4e6c732894f167. The existing shared gate
now checks the native HDFS NameNode and selected Hadoop provider before
analysis; final sink binding rechecks normalized backend properties, including
configuration resources. FE cleanup checks its actual storage binding and
path/default-filesystem selection before FileSystemFactory is called, including
when a nominal S3 sink selects Hadoop storage for cleanup.
The checks cover `file:///`, selected LocalFileSystem/RawLocalFileSystem,
Hadoop key trimming and canonical/legacy default-FS aliases. Indirect
filesystem selectors require the existing startup opt-in because aliases and BE
runtime configuration can change their effective values. Explicit remote
filesystems and unselected `fs.file.impl` settings remain permitted; enabled
requests retain the existing Hadoop implementation/configuration.
All 45 selected FE tests passed with fresh XML and unchanged sources. Cases
cover INSERT/EXPLAIN, direct binding, normalized resources, disabled/enabled
and remote controls, plus global LOAD with cleanup enabled. Mock assertions
verify no filesystem-factory or executor interaction on rejection; no real
directory deletion was performed. Java Checkstyle passed. This closes the
original LOCAL default-off requirement without changing BE/Lance or global
storage code.
--
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]