Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
Impala 2.9.0
-
ghx-label-5
Description
our impalad start with flag use_local_tz_for_unix_timestamp_conversions = true
so be timeconversion use local time zone
Frontend KuduUtil call utc_to_unix_micros function got time (not handle local time zone branch , time is not equal be time conversion TimestampValue::ToUnixTime)
// Some comments here inline bool TimestampValue::UtcToUnixTime(time_t* unix_time) const { DCHECK(unix_time != nullptr); if (UNLIKELY(!HasDateAndTime())) return false; const boost::posix_time::ptime temp(date_, time_); tm temp_tm = boost::posix_time::to_tm(temp); // TODO: Conversion using libc is very expensive (IMPALA-5357); find an alternative. *unix_time = timegm(&temp_tm); return true; }
beijing/china is UTC + 8, return wrong result