This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 4d107bd5dc [FIX](regresstest) fix local tvf for doris cluter mode
which here may not has fe log in #24187
4d107bd5dc is described below
commit 4d107bd5dcedf536c68d333fc8c7535a8551cfb9
Author: amory <[email protected]>
AuthorDate: Tue Sep 12 18:42:12 2023 +0800
[FIX](regresstest) fix local tvf for doris cluter mode which here may not
has fe log in #24187
---
.../external_table_p0/tvf/test_local_tvf.groovy | 86 +++++++++++-----------
1 file changed, 45 insertions(+), 41 deletions(-)
diff --git a/regression-test/suites/external_table_p0/tvf/test_local_tvf.groovy
b/regression-test/suites/external_table_p0/tvf/test_local_tvf.groovy
index abadcf2126..21d985b358 100644
--- a/regression-test/suites/external_table_p0/tvf/test_local_tvf.groovy
+++ b/regression-test/suites/external_table_p0/tvf/test_local_tvf.groovy
@@ -19,53 +19,57 @@
suite("test_local_tvf") {
List<List<Object>> table = sql """ select * from backends(); """
assertTrue(table.size() > 0)
- def be_id = table[0][0]
- List<List<Object>> doris_log = sql """ ADMIN SHOW FRONTEND CONFIG like
"sys_log_dir"; """
- assertTrue(doris_log.size() > 0)
- def doris_log_path = doris_log[0][1]
+ if ( table.size() == 1) {
+ // here may do not have fe log with multi doris be cluster
+ def be_id = table[0][0]
- table = sql """
- select count(*) from local(
- "file_path" = "${doris_log_path}/fe.out",
- "backend_id" = "${be_id}",
- "format" = "csv")
- where c1 like "%FE type%";"""
+ List<List<Object>> doris_log = sql """ ADMIN SHOW FRONTEND CONFIG like
"sys_log_dir"; """
+ assertTrue(doris_log.size() > 0)
+ def doris_log_path = doris_log[0][1]
- assertTrue(table.size() > 0)
- assertTrue(Long.valueOf(table[0][0]) > 0)
+ table = sql """
+ select count(*) from local(
+ "file_path" = "${doris_log_path}/fe.out",
+ "backend_id" = "${be_id}",
+ "format" = "csv")
+ where c1 like "%FE type%";"""
- table = sql """
- select count(*) from local(
- "file_path" = "${doris_log_path}/*.out",
- "backend_id" = "${be_id}",
- "format" = "csv")
- where c1 like "%FE type%";"""
+ assertTrue(table.size() > 0)
+ assertTrue(Long.valueOf(table[0][0]) > 0)
- assertTrue(table.size() > 0)
- assertTrue(Long.valueOf(table[0][0]) > 0)
+ table = sql """
+ select count(*) from local(
+ "file_path" = "${doris_log_path}/*.out",
+ "backend_id" = "${be_id}",
+ "format" = "csv")
+ where c1 like "%FE type%";"""
- test {
- sql """
- select count(*) from local(
- "file_path" = "../fe.out",
- "backend_id" = "${be_id}",
- "format" = "csv")
- where c1 like "%FE type%";
- """
- // check exception message contains
- exception "can not contain '..' in path"
- }
+ assertTrue(table.size() > 0)
+ assertTrue(Long.valueOf(table[0][0]) > 0)
+
+ test {
+ sql """
+ select count(*) from local(
+ "file_path" = "../fe.out",
+ "backend_id" = "${be_id}",
+ "format" = "csv")
+ where c1 like "%FE type%";
+ """
+ // check exception message contains
+ exception "can not contain '..' in path"
+ }
- test {
- sql """
- select count(*) from local(
- "file_path" = "./xx.out",
- "backend_id" = "${be_id}",
- "format" = "csv")
- where c1 like "%FE type%";
- """
- // check exception message contains
- exception "No matches found"
+ test {
+ sql """
+ select count(*) from local(
+ "file_path" = "./xx.out",
+ "backend_id" = "${be_id}",
+ "format" = "csv")
+ where c1 like "%FE type%";
+ """
+ // check exception message contains
+ exception "No matches found"
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]