You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2022/10/04 13:30:44 UTC

[doris] branch master updated: [improvement](ResourceTag) support upper case in tag name (#13063)

This is an automated email from the ASF dual-hosted git repository.

morningman 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 74fc98ceeb [improvement](ResourceTag) support upper case in tag name (#13063)
74fc98ceeb is described below

commit 74fc98ceeb380912c259459e7d17ce544a29a95a
Author: Zhengguo Yang <ya...@gmail.com>
AuthorDate: Tue Oct 4 21:30:37 2022 +0800

    [improvement](ResourceTag) support upper case in tag name (#13063)
---
 fe/fe-core/src/main/java/org/apache/doris/resource/Tag.java     | 2 +-
 fe/fe-core/src/test/java/org/apache/doris/resource/TagTest.java | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/resource/Tag.java b/fe/fe-core/src/main/java/org/apache/doris/resource/Tag.java
index ffee32ea10..d713e2c61e 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/resource/Tag.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/resource/Tag.java
@@ -71,7 +71,7 @@ public class Tag implements Writable {
     public static final ImmutableSet<String> RESERVED_TAG_VALUES = ImmutableSet.of(
             VALUE_FRONTEND, VALUE_BACKEND, VALUE_BROKER, VALUE_REMOTE_STORAGE, VALUE_STORE, VALUE_COMPUTATION,
             VALUE_DEFAULT_CLUSTER);
-    private static final String TAG_REGEX = "^[a-z][a-z0-9_]{0,32}$";
+    private static final String TAG_REGEX = "^[a-zA-Z][a-zA-Z0-9_]{0,32}$";
 
     public static final Tag DEFAULT_BACKEND_TAG;
     public static final Tag INVALID_TAG;
diff --git a/fe/fe-core/src/test/java/org/apache/doris/resource/TagTest.java b/fe/fe-core/src/test/java/org/apache/doris/resource/TagTest.java
index 81300c4677..230e1a2775 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/resource/TagTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/resource/TagTest.java
@@ -40,6 +40,8 @@ public class TagTest {
     @Test
     public void testTagName3() throws AnalysisException {
         Tag.create("unknown", "test1");
+        Tag.create("unknown", "Test1");
+        Tag.create("unknown", "tTest1");
     }
 
     @Test


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org