This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-1.2-lts in repository https://gitbox.apache.org/repos/asf/doris.git
commit a553bc6d7bb4946ed6e1a2fa2fe5c583857bb6c3 Author: Qi Chen <kaka11.c...@gmail.com> AuthorDate: Fri Jan 20 12:40:25 2023 +0800 [Fix][regression-test] Fix test_hdfs_tvf.groovy by update HDFS conf URI to uri and better error msg handling. (#16029) Fix test_hdfs_tvf.groovy by update HDFS conf URI to uri and better error msg handling. test_hdfs_tvf.groovy didn't passed. --- .../java/org/apache/doris/tablefunction/HdfsTableValuedFunction.java | 3 +++ .../suites/correctness_p0/table_valued_function/test_hdfs_tvf.groovy | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/HdfsTableValuedFunction.java b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/HdfsTableValuedFunction.java index 542fc46bee..9c845103f9 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/tablefunction/HdfsTableValuedFunction.java +++ b/fe/fe-core/src/main/java/org/apache/doris/tablefunction/HdfsTableValuedFunction.java @@ -80,6 +80,9 @@ public class HdfsTableValuedFunction extends ExternalFileTableValuedFunction { } } + if (!locationProperties.containsKey(HDFS_URI)) { + throw new AnalysisException(String.format("Configuration '%s' is required.", HDFS_URI)); + } ExportStmt.checkPath(locationProperties.get(HDFS_URI), StorageType.HDFS); hdfsUri = URI.create(locationProperties.get(HDFS_URI)); filePath = locationProperties.get(HADOOP_FS_NAME) + hdfsUri.getPath(); diff --git a/regression-test/suites/correctness_p0/table_valued_function/test_hdfs_tvf.groovy b/regression-test/suites/correctness_p0/table_valued_function/test_hdfs_tvf.groovy index 4c4f940026..5a283eafa2 100644 --- a/regression-test/suites/correctness_p0/table_valued_function/test_hdfs_tvf.groovy +++ b/regression-test/suites/correctness_p0/table_valued_function/test_hdfs_tvf.groovy @@ -48,7 +48,7 @@ suite("test_hdfs_tvf") { uri = "${defaultFS}" + "/user/doris/preinstalled_data/csv_format_test/array_malformat.csv" format = "csv" qt_csv_array_malformat """ select * from HDFS( - "URI" = "${uri}", + "uri" = "${uri}", "fs.defaultFS"= "${defaultFS}", "hadoop.username" = "${hdfsUserName}", "format" = "csv", @@ -56,7 +56,7 @@ suite("test_hdfs_tvf") { uri = "${defaultFS}" + "/user/doris/preinstalled_data/csv_format_test/array_normal.csv" format = "csv" - qt_csv_array_normal """ select * from HDFS("URI" = "${uri}", + qt_csv_array_normal """ select * from HDFS("uri" = "${uri}", "fs.defaultFS"= "${defaultFS}", "hadoop.username" = "${hdfsUserName}", "format" = "csv", --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org