This is an automated email from the ASF dual-hosted git repository.
joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/master by this push:
new 8eac9fb20 IMPALA-11563: Optimized /etc/sysconfig/clock to find the
time zone
8eac9fb20 is described below
commit 8eac9fb2019e6bff363d4223fe432fc374704efd
Author: xiabaike <[email protected]>
AuthorDate: Fri Sep 9 03:27:25 2022 +0000
IMPALA-11563: Optimized /etc/sysconfig/clock to find the time zone
For /etc/sysconfig/clock, when a row has a '#', we can skip that row,
and optimize the content of parsing lines.
This will fix the parsing problem caused by the '# Zone="utc"'.
Change-Id: I7f80fd1817d072f8dadf288025cb9534191ca458
Reviewed-on: http://gerrit.cloudera.org:8080/18958
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
be/src/exprs/timezone_db.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/be/src/exprs/timezone_db.cc b/be/src/exprs/timezone_db.cc
index e3acd123c..56aa66a13 100644
--- a/be/src/exprs/timezone_db.cc
+++ b/be/src/exprs/timezone_db.cc
@@ -180,6 +180,7 @@ string TimezoneDatabase::LocalZoneName() {
string result;
while (timezone_file) {
getline(timezone_file, result);
+ if (result.rfind("#", 0) == 0) continue;
auto p = result.find("ZONE=\"");
if (p != string::npos) {
result.erase(p, p + 6);