You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Mryange (via GitHub)" <gi...@apache.org> on 2024/09/19 09:51:06 UTC
[PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Mryange opened a new pull request, #41008:
URL: https://github.com/apache/doris/pull/41008
## Proposed changes
```
mysql> select cast(4562632 as time),hour(cast(4562632 as time)), minute(cast(4562632 as time)),second(cast(4562632 as time));
+-----------------------+-----------------------------+-------------------------------+-------------------------------+
| cast(4562632 as TIME) | hour(cast(4562632 as TIME)) | minute(cast(4562632 as TIME)) | second(cast(4562632 as TIME)) |
+-----------------------+-----------------------------+-------------------------------+-------------------------------+
| 456:26:32 | 456 | 26 | 32 |
+-----------------------+-----------------------------+-------------------------------+-------------------------------+
```
<!--Describe your changes.-->
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "HappenLee (via GitHub)" <gi...@apache.org>.
HappenLee commented on code in PR #41008:
URL: https://github.com/apache/doris/pull/41008#discussion_r1767914507
##########
be/src/vec/functions/function_time_value_to_field.cpp:
##########
@@ -0,0 +1,99 @@
+// 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.
+
+#include <memory>
+#include <variant>
+
+#include "common/status.h"
+#include "vec/data_types/data_type_number.h"
+#include "vec/data_types/data_type_time.h"
+#include "vec/functions/function.h"
+#include "vec/functions/simple_function_factory.h"
+#include "vec/runtime/time_value.h"
+#include "vec/utils/template_helpers.hpp"
+namespace doris::vectorized {
+
+template <typename ToDataType, typename Transform>
+class FunctionTimeValueToField : public IFunction {
+public:
+ static constexpr auto name = Transform::name;
+ static FunctionPtr create() { return std::make_shared<FunctionTimeValueToField>(); }
+ String get_name() const override { return name; }
+
+ // is_variadic and get_number_of_arguments are consistent with FunctionDateOrDateTimeToSomething,
+ // as FunctionDateOrDateTimeToSomething supports Date and DateTime types as arguments.
+ bool is_variadic() const override { return true; }
+ size_t get_number_of_arguments() const override { return 0; }
+
+ DataTypes get_variadic_argument_types_impl() const override {
+ return {std::make_shared<DataTypeTimeV2>()};
+ }
+
+ DataTypePtr get_return_type_impl(const ColumnsWithTypeAndName& arguments) const override {
+ return std::make_shared<ToDataType>();
+ }
+
+ bool use_default_implementation_for_nulls() const override { return true; }
+
+ Status execute_impl(FunctionContext* context, Block& block, const ColumnNumbers& arguments,
+ size_t result, size_t input_rows_count) const override {
+ DCHECK_EQ(arguments.size(), 1);
+ const auto& [arg_column, arg_const] =
Review Comment:
no need dispose const column
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2360761886
TeamCity be ut coverage result:
Function Coverage: 37.31% (9594/25714)
Line Coverage: 28.71% (79280/276130)
Region Coverage: 28.17% (41039/145674)
Branch Coverage: 24.80% (20908/84312)
Coverage Report: http://coverage.selectdb-in.cc/coverage/03ec5eb8fbae35f1e9068c5891a34ba1148d448d_03ec5eb8fbae35f1e9068c5891a34ba1148d448d/report/index.html
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2428061470
clang-tidy review says "All clean, LGTM! :+1:"
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "superdiaodiao (via GitHub)" <gi...@apache.org>.
superdiaodiao commented on code in PR #41008:
URL: https://github.com/apache/doris/pull/41008#discussion_r1766686407
##########
be/src/vec/runtime/time_value.h:
##########
@@ -22,17 +22,47 @@
#include "runtime/define_primitive_type.h"
#include "runtime/primitive_type.h"
#include "util/date_func.h"
+#include "vec/data_types/data_type_time.h"
namespace doris {
/// TODO: Due to the "Time type is not supported for OLAP table" issue, a lot of basic content is missing.It will be supplemented later.
class TimeValue {
+public:
+ constexpr static int64_t ONE_SECOND_MICROSECONDS = 1000000;
+ constexpr static int64_t ONE_MINUTE_MICROSECONDS = 60 * ONE_SECOND_MICROSECONDS;
+ constexpr static int64_t ONE_HOUR_MICROSECONDS = 60 * ONE_MINUTE_MICROSECONDS;
+ constexpr static int64_t ONE_MINUTE_SECONDS = 60;
+ constexpr static int64_t ONE_HOUR_SECONDS = 60 * ONE_MINUTE_SECONDS;
+
using TimeType = typename PrimitiveTypeTraits<TYPE_TIMEV2>::CppType;
+ using ColumnTime = vectorized::DataTypeTimeV2::ColumnType;
+
+ // refer to https://dev.mysql.com/doc/refman/5.7/en/time.html
+ // the time value between '-838:59:59' and '838:59:59'
+ /// TODO: Why is the time type stored as double? Can we directly use int64 and remove the time limit?
+ static int64_t check_over_max_time(double time) {
+ const static int64_t max_time = 3020399LL * 1000 * 1000;
+ if (time > max_time) {
+ return max_time;
+ } else if (time < -max_time) {
+ return max_time;
+ }
Review Comment:
The second return should be `-max_time`? If not, we could merge two conditions.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2425869161
PR approved by at least one committer and no changes requested.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2360532057
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2427068316
run p0
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2360666892
<details>
<summary>ClickBench: <b>Total hot run time: 33.19 s</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 03ec5eb8fbae35f1e9068c5891a34ba1148d448d, data reload: false
query1 0.04 0.05 0.04
query2 0.07 0.03 0.02
query3 0.23 0.06 0.06
query4 1.66 0.10 0.10
query5 0.53 0.49 0.52
query6 1.15 0.73 0.72
query7 0.01 0.01 0.02
query8 0.04 0.03 0.03
query9 0.56 0.49 0.48
query10 0.57 0.57 0.54
query11 0.14 0.10 0.10
query12 0.15 0.11 0.10
query13 0.62 0.58 0.59
query14 2.99 2.93 3.04
query15 0.88 0.82 0.82
query16 0.38 0.39 0.38
query17 1.06 1.02 1.07
query18 0.23 0.21 0.20
query19 1.95 1.80 2.05
query20 0.01 0.01 0.01
query21 15.36 0.62 0.61
query22 2.63 3.07 1.89
query23 17.34 0.97 0.86
query24 3.00 1.94 1.31
query25 0.31 0.12 0.10
query26 0.49 0.14 0.13
query27 0.04 0.04 0.04
query28 10.04 1.08 1.07
query29 12.54 3.28 3.20
query30 0.24 0.06 0.06
query31 2.90 0.40 0.39
query32 3.24 0.47 0.46
query33 2.98 3.02 3.03
query34 17.07 4.39 4.43
query35 4.50 4.44 4.48
query36 0.64 0.49 0.49
query37 0.08 0.06 0.06
query38 0.05 0.04 0.03
query39 0.04 0.02 0.02
query40 0.16 0.12 0.12
query41 0.08 0.02 0.02
query42 0.04 0.02 0.02
query43 0.03 0.03 0.03
Total cold run time: 107.07 s
Total hot run time: 33.19 s
```
</details>
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "HappenLee (via GitHub)" <gi...@apache.org>.
HappenLee commented on code in PR #41008:
URL: https://github.com/apache/doris/pull/41008#discussion_r1767912800
##########
be/src/vec/functions/function_time_value_to_field.cpp:
##########
@@ -0,0 +1,99 @@
+// 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.
+
+#include <memory>
+#include <variant>
+
+#include "common/status.h"
+#include "vec/data_types/data_type_number.h"
+#include "vec/data_types/data_type_time.h"
+#include "vec/functions/function.h"
+#include "vec/functions/simple_function_factory.h"
+#include "vec/runtime/time_value.h"
+#include "vec/utils/template_helpers.hpp"
+namespace doris::vectorized {
+
+template <typename ToDataType, typename Transform>
+class FunctionTimeValueToField : public IFunction {
+public:
+ static constexpr auto name = Transform::name;
+ static FunctionPtr create() { return std::make_shared<FunctionTimeValueToField>(); }
+ String get_name() const override { return name; }
+
+ // is_variadic and get_number_of_arguments are consistent with FunctionDateOrDateTimeToSomething,
+ // as FunctionDateOrDateTimeToSomething supports Date and DateTime types as arguments.
+ bool is_variadic() const override { return true; }
+ size_t get_number_of_arguments() const override { return 0; }
Review Comment:
if set `is_variadic` no need override the `get_number_of_arguments`
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2360632588
<details>
<summary>TPC-H: <b>Total hot run time: 42187 ms</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 03ec5eb8fbae35f1e9068c5891a34ba1148d448d, data reload: false
------ Round 1 ----------------------------------
q1 18249 7464 7355 7355
q2 2733 168 177 168
q3 11285 1210 1227 1210
q4 10357 811 767 767
q5 8221 3208 3169 3169
q6 240 154 151 151
q7 1029 648 614 614
q8 9491 2090 2069 2069
q9 6900 6425 6435 6425
q10 7006 2350 2287 2287
q11 431 249 250 249
q12 401 222 227 222
q13 17773 3005 3005 3005
q14 236 203 220 203
q15 579 534 513 513
q16 681 600 618 600
q17 1001 864 845 845
q18 7302 6841 6722 6722
q19 1408 1099 1079 1079
q20 605 288 293 288
q21 4057 3342 3233 3233
q22 1124 1036 1013 1013
Total cold run time: 111109 ms
Total hot run time: 42187 ms
----- Round 2, with runtime_filter_mode=off -----
q1 7226 7244 7362 7244
q2 320 232 236 232
q3 2973 2790 2800 2790
q4 1992 1752 1730 1730
q5 5414 5436 5454 5436
q6 225 143 144 143
q7 2112 1724 1724 1724
q8 3213 3345 3328 3328
q9 8507 8392 8421 8392
q10 3393 3374 3354 3354
q11 578 469 480 469
q12 797 561 589 561
q13 7827 3032 3014 3014
q14 309 272 274 272
q15 582 509 511 509
q16 701 683 676 676
q17 1764 1573 1537 1537
q18 7835 7360 7492 7360
q19 1708 1528 1478 1478
q20 2062 1821 1801 1801
q21 5505 5299 5208 5208
q22 1094 1027 1017 1017
Total cold run time: 66137 ms
Total hot run time: 58275 ms
```
</details>
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2370787509
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2362920983
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2370928787
TeamCity be ut coverage result:
Function Coverage: 37.28% (9620/25803)
Line Coverage: 28.70% (79573/277303)
Region Coverage: 28.15% (41155/146220)
Branch Coverage: 24.78% (20969/84628)
Coverage Report: http://coverage.selectdb-in.cc/coverage/54f9c21c1a5fc907fb05ab63ccbf03e0a15de7b0_54f9c21c1a5fc907fb05ab63ccbf03e0a15de7b0/report/index.html
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2428057508
skip buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2360655681
<details>
<summary>TPC-DS: <b>Total hot run time: 191250 ms</b></summary>
```
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 03ec5eb8fbae35f1e9068c5891a34ba1148d448d, data reload: false
query1 968 375 366 366
query2 6531 2146 2011 2011
query3 6705 214 226 214
query4 34402 23523 23393 23393
query5 4309 472 470 470
query6 253 174 173 173
query7 4618 304 302 302
query8 287 225 216 216
query9 9409 2648 2647 2647
query10 486 285 287 285
query11 18176 15193 15149 15149
query12 160 99 102 99
query13 1631 423 406 406
query14 10204 7737 7407 7407
query15 331 164 172 164
query16 7353 473 481 473
query17 1759 558 530 530
query18 1293 313 304 304
query19 371 152 158 152
query20 117 106 109 106
query21 212 107 105 105
query22 4529 4299 4264 4264
query23 35248 34523 34136 34136
query24 11100 2924 2873 2873
query25 553 409 396 396
query26 875 162 162 162
query27 2425 293 284 284
query28 7638 2501 2448 2448
query29 665 427 422 422
query30 322 165 155 155
query31 1025 815 790 790
query32 103 55 58 55
query33 782 306 305 305
query34 948 497 476 476
query35 880 730 734 730
query36 1077 917 946 917
query37 145 86 88 86
query38 4142 3837 3886 3837
query39 1487 1430 1407 1407
query40 289 103 99 99
query41 51 49 50 49
query42 115 97 101 97
query43 537 484 483 483
query44 1373 834 796 796
query45 197 166 163 163
query46 1141 789 762 762
query47 1902 1825 1901 1825
query48 446 364 376 364
query49 1149 417 403 403
query50 824 407 413 407
query51 7030 6851 6906 6851
query52 101 89 90 89
query53 259 184 185 184
query54 1230 472 476 472
query55 87 77 81 77
query56 290 278 268 268
query57 1202 1127 1098 1098
query58 256 236 236 236
query59 3281 2893 3093 2893
query60 313 274 283 274
query61 129 130 122 122
query62 906 660 685 660
query63 216 192 203 192
query64 5253 739 655 655
query65 3295 3207 3170 3170
query66 1305 298 298 298
query67 16052 15566 15425 15425
query68 4832 578 558 558
query69 464 294 291 291
query70 1151 1132 1123 1123
query71 380 274 264 264
query72 6094 4157 4199 4157
query73 769 329 335 329
query74 9985 9023 9115 9023
query75 3391 2669 2655 2655
query76 2914 876 964 876
query77 418 301 296 296
query78 9874 9207 9147 9147
query79 1394 536 553 536
query80 1085 450 447 447
query81 553 238 241 238
query82 949 151 147 147
query83 228 137 135 135
query84 241 80 83 80
query85 1268 296 286 286
query86 363 309 277 277
query87 4449 4320 4363 4320
query88 2983 2320 2338 2320
query89 384 282 275 275
query90 1827 190 191 190
query91 186 142 145 142
query92 61 48 46 46
query93 1066 559 542 542
query94 914 299 289 289
query95 347 261 258 258
query96 617 281 274 274
query97 3288 3161 3095 3095
query98 215 204 197 197
query99 1575 1311 1310 1310
Total cold run time: 297013 ms
Total hot run time: 191250 ms
```
</details>
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2360805216
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2363257678
TeamCity be ut coverage result:
Function Coverage: 37.25% (9600/25773)
Line Coverage: 28.65% (79326/276849)
Region Coverage: 28.11% (41054/146023)
Branch Coverage: 24.73% (20904/84530)
Coverage Report: http://coverage.selectdb-in.cc/coverage/54f9c21c1a5fc907fb05ab63ccbf03e0a15de7b0_54f9c21c1a5fc907fb05ab63ccbf03e0a15de7b0/report/index.html
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2360917792
TeamCity be ut coverage result:
Function Coverage: 37.31% (9593/25715)
Line Coverage: 28.70% (79264/276171)
Region Coverage: 28.16% (41030/145689)
Branch Coverage: 24.79% (20901/84322)
Coverage Report: http://coverage.selectdb-in.cc/coverage/4af3b2dcde6b6aba108aad282c98acebb58d6efb_4af3b2dcde6b6aba108aad282c98acebb58d6efb/report/index.html
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2426491920
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2426580037
TeamCity be ut coverage result:
Function Coverage: 37.45% (9703/25907)
Line Coverage: 28.71% (80535/280520)
Region Coverage: 28.15% (41662/148014)
Branch Coverage: 24.71% (21166/85644)
Coverage Report: http://coverage.selectdb-in.cc/coverage/54f9c21c1a5fc907fb05ab63ccbf03e0a15de7b0_54f9c21c1a5fc907fb05ab63ccbf03e0a15de7b0/report/index.html
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "superdiaodiao (via GitHub)" <gi...@apache.org>.
superdiaodiao commented on code in PR #41008:
URL: https://github.com/apache/doris/pull/41008#discussion_r1766691920
##########
be/src/vec/functions/function_time_value_to_field.cpp:
##########
@@ -0,0 +1,97 @@
+// 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.
+
+#include <memory>
+#include <variant>
+
+#include "common/status.h"
+#include "vec/data_types/data_type_number.h"
+#include "vec/data_types/data_type_time.h"
+#include "vec/functions/function.h"
+#include "vec/functions/simple_function_factory.h"
+#include "vec/runtime/time_value.h"
+#include "vec/utils/template_helpers.hpp"
+namespace doris::vectorized {
+
+template <typename ToDataType, typename Transform>
+class FunctionTimeValueToField : public IFunction {
+public:
+ static constexpr auto name = Transform::name;
+ static FunctionPtr create() { return std::make_shared<FunctionTimeValueToField>(); }
+ String get_name() const override { return name; }
+
+ bool is_variadic() const override { return true; }
+ size_t get_number_of_arguments() const override { return 0; }
+
+ DataTypes get_variadic_argument_types_impl() const override {
+ return {std::make_shared<DataTypeTimeV2>()};
+ }
+
+ DataTypePtr get_return_type_impl(const ColumnsWithTypeAndName& arguments) const override {
+ return std::make_shared<ToDataType>();
+ }
+
+ bool use_default_implementation_for_nulls() const override { return true; }
+
Review Comment:
Since this function in parent class has been `true`, we can remove this line.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen merged PR #41008:
URL: https://github.com/apache/doris/pull/41008
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "zhangstar333 (via GitHub)" <gi...@apache.org>.
zhangstar333 commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2425904182
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2425869233
PR approved by anyone and no changes requested.
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2426132828
TeamCity be ut coverage result:
Function Coverage: 37.45% (9703/25907)
Line Coverage: 28.70% (80511/280520)
Region Coverage: 28.14% (41655/148014)
Branch Coverage: 24.72% (21167/85644)
Coverage Report: http://coverage.selectdb-in.cc/coverage/54f9c21c1a5fc907fb05ab63ccbf03e0a15de7b0_54f9c21c1a5fc907fb05ab63ccbf03e0a15de7b0/report/index.html
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2360531750
Thank you for your contribution to Apache Doris.
Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/How+to+process+your+PR)
Since 2024-03-18, the Document has been moved to [doris-website](https://github.com/apache/doris-website).
See [Doris Document](https://cwiki.apache.org/confluence/display/DORIS/Doris+Document).
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
Re: [PR] [feature](function) hour/minute/second functions support time as an argument. [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on PR #41008:
URL: https://github.com/apache/doris/pull/41008#issuecomment-2363053850
run buildall
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org