You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/08/07 11:45:31 UTC

[GitHub] [incubator-doris] imay commented on a change in pull request #1598: Time zone related be function

imay commented on a change in pull request #1598: Time zone related be function
URL: https://github.com/apache/incubator-doris/pull/1598#discussion_r311507987
 
 

 ##########
 File path: be/src/runtime/timestamp_value.h
 ##########
 @@ -0,0 +1,174 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#ifndef DORIS_BE_RUNTIME_TIMESTAMP_VALUE_H
+#define DORIS_BE_RUNTIME_TIMESTAMP_VALUE_H
+
+#include <stdint.h>
+#include <iostream>
+#include <cstddef>
+#include <sstream>
+
+#include "exprs/timestamp_functions.h"
+#include "udf/udf.h"
+#include "util/hash_util.hpp"
+
+namespace doris {
+
+// Functions to load and access the timestamp database.
+class TimezoneDatabase {
+public:
+    TimezoneDatabase();
+
+    ~TimezoneDatabase();
+
+    static void init() {
+        TimezoneDatabase();
+    }
+
+    static boost::local_time::time_zone_ptr find_timezone(const std::string &tz);
+
+private:
+    static const char *_s_timezone_database_str;
+    static boost::local_time::tz_database _s_tz_database;
+};
+
+class TimestampValue {
 
 Review comment:
   I think we just implement a constructor with (timestamp and timezone) in DataTimeValue is enough. And we can reuse code of DateTimeValue

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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