[fix](outfile) unify broker and hdfs path in outfile (#18809)
unify broker and hdfs path in outfile fix fe ut and add outfile case
This commit is contained in:
@ -552,7 +552,14 @@ public class OutFileClause {
|
||||
} else {
|
||||
isLocalOutput = false;
|
||||
}
|
||||
|
||||
if (properties != null) {
|
||||
String namePrefix = properties.containsKey(PROP_BROKER_NAME)
|
||||
? BROKER_PROP_PREFIX + HdfsResource.DSF_NAMESERVICES : HdfsResource.DSF_NAMESERVICES;
|
||||
String dfsNameServices = properties.getOrDefault(namePrefix, "");
|
||||
if (!Strings.isNullOrEmpty(dfsNameServices) && !filePath.contains(dfsNameServices)) {
|
||||
filePath = filePath.replace(HDFS_FILE_PREFIX, HDFS_FILE_PREFIX + dfsNameServices);
|
||||
}
|
||||
}
|
||||
if (Strings.isNullOrEmpty(filePath)) {
|
||||
throw new AnalysisException("Must specify file in OUTFILE clause");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user