Skip to content

Commit

Permalink
[improvement](ResourceTag) support upper case in tag name (apache#13063)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangzhg authored Oct 4, 2022
1 parent 984d387 commit 74fc98c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public void testTagName2() throws AnalysisException {
@Test
public void testTagName3() throws AnalysisException {
Tag.create("unknown", "test1");
Tag.create("unknown", "Test1");
Tag.create("unknown", "tTest1");
}

@Test
Expand Down

0 comments on commit 74fc98c

Please sign in to comment.