meredith620 commented on PR #14531:
URL: https://github.com/apache/doris/pull/14531#issuecomment-1333816291
I add a session variable 'enable_unicode_name_support', and use it to switch
regex like this in class FeNameFormat
```java
public static String getLabelRegex() {
if
(ConnectContext.get().getSessionVariable().isEnableUnicodeNameSupport()) {
return UNICODE_LABEL_REGEX;
} else {
return LABEL_REGEX;
}
}
```
Then I find one section in
[TimeUtils.java](https://github.com/apache/doris/blob/1.1.5-rc01/fe/fe-core/src/main/java/org/apache/doris/common/util/TimeUtils.java#L123)
```java
public static TimeZone getTimeZone() {
String timezone;
if (ConnectContext.get() != null) {
timezone =
ConnectContext.get().getSessionVariable().getTimeZone();
} else {
timezone = VariableMgr.getDefaultSessionVariable().getTimeZone();
}
return TimeZone.getTimeZone(ZoneId.of(timezone, timeZoneAliasMap));
}
```
@yiguolei My question is when should I check if `ConnectContext.get()`
returns null and use `VariableMgr.getDefaultSessionVariable()` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]