This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new cf0ac8a9124 branch-4.0: [test](regression) Shorten generated HMS and
DLF identifiers in catalog case #62313 (#62328)
cf0ac8a9124 is described below
commit cf0ac8a91240ec358af09d910655c346e0ebe1ab
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri May 15 21:11:39 2026 -0700
branch-4.0: [test](regression) Shorten generated HMS and DLF identifiers in
catalog case #62313 (#62328)
Cherry-picked from #62313
Co-authored-by: Calvin Kirs <[email protected]>
---
.../hive_on_hms_and_dlf.groovy | 24 +++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git
a/regression-test/suites/external_table_p2/refactor_catalog_param/hive_on_hms_and_dlf.groovy
b/regression-test/suites/external_table_p2/refactor_catalog_param/hive_on_hms_and_dlf.groovy
index 12850cc1091..7ea91e052c8 100644
---
a/regression-test/suites/external_table_p2/refactor_catalog_param/hive_on_hms_and_dlf.groovy
+++
b/regression-test/suites/external_table_p2/refactor_catalog_param/hive_on_hms_and_dlf.groovy
@@ -19,6 +19,16 @@ import java.util.concurrent.ThreadLocalRandom
suite("hive_on_hms_and_dlf", "p2,external,new_catalog_property") {
+ // Keep generated identifiers under the FE 64-character limit for long
prefixes.
+ def buildDbName = { String prefix ->
+ def suffix = String.format("_db%d%03d", System.currentTimeMillis(),
ThreadLocalRandom.current().nextInt(1000))
+ return prefix.take(64 - suffix.length()) + suffix
+ }
+
+ def buildTableName = { String prefix, String suffix ->
+ def randomSuffix = String.format("%03d",
ThreadLocalRandom.current().nextInt(1000))
+ return prefix.take(64 - randomSuffix.length() - suffix.length()) +
randomSuffix + suffix
+ }
def testQueryAndInsert = { String catalogProperties, String prefix, String
dbLocation ->
@@ -35,7 +45,7 @@ suite("hive_on_hms_and_dlf",
"p2,external,new_catalog_property") {
switch ${catalog_name};
"""
- def db_name = prefix + "_db" + System.currentTimeMillis() +
ThreadLocalRandom.current().nextInt(1000)
+ def db_name = buildDbName(prefix)
sql """
DROP DATABASE IF EXISTS ${db_name} FORCE;
"""
@@ -53,7 +63,7 @@ suite("hive_on_hms_and_dlf",
"p2,external,new_catalog_property") {
sql """
use ${db_name};
"""
- def table_name = prefix + ThreadLocalRandom.current().nextInt(1000) +
"_table"
+ def table_name = buildTableName(prefix, "_table")
sql """
CREATE TABLE ${table_name} (
user_id BIGINT COMMENT "user id",
@@ -98,7 +108,7 @@ suite("hive_on_hms_and_dlf",
"p2,external,new_catalog_property") {
switch ${catalog_name};
"""
- def db_name = prefix + "_db" + System.currentTimeMillis() +
ThreadLocalRandom.current().nextInt(1000)
+ def db_name = buildDbName(prefix)
sql """
DROP DATABASE IF EXISTS ${db_name} FORCE;
"""
@@ -116,7 +126,7 @@ suite("hive_on_hms_and_dlf",
"p2,external,new_catalog_property") {
use ${db_name};
"""
- def table_name = prefix + ThreadLocalRandom.current().nextInt(1000) +
"_partition_table"
+ def table_name = buildTableName(prefix, "_partition_table")
// Create partitioned table
sql """
@@ -198,7 +208,7 @@ suite("hive_on_hms_and_dlf",
"p2,external,new_catalog_property") {
switch ${catalog_name};
"""
- def db_name = prefix + "_db" + System.currentTimeMillis() +
ThreadLocalRandom.current().nextInt(1000)
+ def db_name = buildDbName(prefix)
sql """
DROP DATABASE IF EXISTS ${db_name} FORCE;
"""
@@ -216,7 +226,7 @@ suite("hive_on_hms_and_dlf",
"p2,external,new_catalog_property") {
use ${db_name};
"""
- def table_name = prefix + ThreadLocalRandom.current().nextInt(1000) +
"_overwrite_table"
+ def table_name = buildTableName(prefix, "_overwrite_table")
// Create non-partitioned table for insert overwrite test
sql """
@@ -579,4 +589,4 @@ suite("hive_on_hms_and_dlf",
"p2,external,new_catalog_property") {
// not has region param
db_location = "${dlf_warehouse}/hive/dlf-oss/" + System.currentTimeMillis()
testQueryAndInsert(dlf_endpoint_properties +
hive_dlf_catalog_base_properties, "hive_dlf_oss_test", db_location)
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]