You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "zclllyybb (via GitHub)" <gi...@apache.org> on 2023/11/12 07:31:50 UTC
[PR] [Enhancement](function) support unix_timestamp with float [doris]
zclllyybb opened a new pull request, #26827:
URL: https://github.com/apache/doris/pull/26827
## Proposed changes
Issue Number: close #xxx
```sql
mysql> select unix_timestamp('2007-11-30 10:30:19.123456');
+--------------------+
| __unix_timestamp_0 |
+--------------------+
| 1196389819.123456 |
+--------------------+
1 row in set (0.10 sec)
```
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1808868243
@Gabriel39 @morrySnow PTAL
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1811794748
<details>
<summary>TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'</summary>
```
Tpch sf100 test result on commit 1fd88e7a54d0cd77eab011684473299a2c414c79, data reload: false
run tpch-sf100 query with default conf and session variables
q1 5303 5159 5039 5039
q2 360 156 157 156
q3 2039 2017 1980 1980
q4 1389 1353 1362 1353
q5 3986 4000 4065 4000
q6 258 131 130 130
q7 1474 888 894 888
q8 2793 2789 2776 2776
q9 9685 9604 9563 9563
q10 3436 3547 3541 3541
q11 396 245 248 245
q12 425 283 288 283
q13 4626 4154 4169 4154
q14 316 287 281 281
q15 639 543 569 543
q16 674 594 591 591
q17 1149 1085 1079 1079
q18 8080 7646 7736 7646
q19 1682 1700 1650 1650
q20 560 321 301 301
q21 4701 4362 4380 4362
q22 510 419 416 416
Total cold run time: 54481 ms
Total hot run time: 50977 ms
run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1 5047 5109 5021 5021
q2 337 216 229 216
q3 4169 4035 4026 4026
q4 2797 2750 2757 2750
q5 9667 9693 9776 9693
q6 245 123 124 123
q7 3063 2531 2523 2523
q8 4855 4850 4879 4850
q9 13199 13140 13236 13140
q10 4059 4179 4196 4179
q11 808 652 648 648
q12 992 815 853 815
q13 4285 3859 3861 3859
q14 382 372 365 365
q15 634 565 536 536
q16 763 681 708 681
q17 3945 3865 3875 3865
q18 9748 9472 9525 9472
q19 1828 1788 1780 1780
q20 2399 2064 2043 2043
q21 8809 8904 8839 8839
q22 904 877 851 851
Total cold run time: 82935 ms
Total hot run time: 80275 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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on code in PR #26827:
URL: https://github.com/apache/doris/pull/26827#discussion_r1402105007
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/TypeCoercionUtils.java:
##########
@@ -412,6 +412,11 @@ private static Expression unSafeCast(Expression input, DataType dataType) {
return promoted;
}
}
+ // adapt scale when from string to datetimev2 with float
+ if (type.isStringLikeType() && dataType.isDateTimeV2Type()) {
+ return recordTypeCoercionForSubQuery(input,
+ DateTimeV2Type.forTypeFromString(((Literal) input).getStringValue()));
Review Comment:
In my opinion, casting a string literal to datetime literal is always correct if the casting doesn't lose any information.
If we have to compare a literal with a column, there's two probability:
1. they could compare directly, like `datetimev2(3)` and `datetimev2(6)`. It doesn't matter.
2. they couldn't compare directly, like `datetimev2(3)` and `varchar`. then we must do a new cast between at least of them.
No matter which one, the second step of conversion(if have) for comparing has nothing to do with the conversion from string to datelike type which doesn't lose information. what you concerned about should be done in the step 2. I'll add some regression-test to prove and ensure this.
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1810728569
<details>
<summary>TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'</summary>
```
Tpch sf100 test result on commit e2ab2a563a228b476093966e720af3bed2844858, data reload: false
run tpch-sf100 query with default conf and session variables
q1 5249 5186 5118 5118
q2 365 148 155 148
q3 2048 2012 2000 2000
q4 1412 1344 1348 1344
q5 3970 3986 3957 3957
q6 253 129 131 129
q7 1484 885 891 885
q8 2792 2801 2768 2768
q9 9719 9672 9521 9521
q10 3445 3547 3516 3516
q11 383 248 246 246
q12 432 280 282 280
q13 4588 4146 4153 4146
q14 309 291 286 286
q15 632 548 545 545
q16 682 599 588 588
q17 1138 1098 1079 1079
q18 8080 7620 7608 7608
q19 1681 1672 1696 1672
q20 544 334 303 303
q21 4669 4365 4360 4360
q22 518 401 421 401
Total cold run time: 54393 ms
Total hot run time: 50900 ms
run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1 4978 5062 5024 5024
q2 332 225 245 225
q3 4060 3982 4000 3982
q4 2778 2763 2764 2763
q5 9642 9576 9638 9576
q6 245 123 123 123
q7 3036 2469 2522 2469
q8 4808 4822 4807 4807
q9 13283 13084 13133 13084
q10 4075 4170 4171 4170
q11 780 640 688 640
q12 990 808 833 808
q13 4284 3869 3884 3869
q14 382 337 344 337
q15 614 529 554 529
q16 742 690 683 683
q17 3914 3902 3853 3853
q18 9571 9349 9433 9349
q19 1776 1792 1789 1789
q20 2430 2092 2037 2037
q21 8797 8614 8801 8614
q22 928 846 837 837
Total cold run time: 82445 ms
Total hot run time: 79568 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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1823536671
TeamCity be ut coverage result:
Function Coverage: 36.56% (8450/23112)
Line Coverage: 28.85% (68676/238073)
Region Coverage: 27.82% (35526/127678)
Branch Coverage: 24.56% (18123/73784)
Coverage Report: http://coverage.selectdb-in.cc/coverage/e45f7c2cc41adbe564505ccc1b523254d7f06068_e45f7c2cc41adbe564505ccc1b523254d7f06068/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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1808866730
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1809558224
<details>
<summary>TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'</summary>
```
Tpch sf100 test result on commit 8560775102dadb67f3f0fadc553d4062d91d8a84, data reload: false
run tpch-sf100 query with default conf and session variables
q1 5288 5143 5069 5069
q2 359 154 160 154
q3 2051 2010 2003 2003
q4 1396 1360 1353 1353
q5 3981 3951 3976 3951
q6 258 130 130 130
q7 1462 887 891 887
q8 2768 2780 2760 2760
q9 9715 9550 9350 9350
q10 3456 3549 3526 3526
q11 389 258 252 252
q12 435 289 294 289
q13 4564 4136 4121 4121
q14 309 295 287 287
q15 596 548 536 536
q16 688 576 584 576
q17 1136 1108 1087 1087
q18 8053 7660 7539 7539
q19 1696 1690 1698 1690
q20 548 291 275 275
q21 4683 4344 4363 4344
q22 505 392 419 392
Total cold run time: 54336 ms
Total hot run time: 50571 ms
run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1 4999 5020 5038 5020
q2 333 231 234 231
q3 4026 4069 3989 3989
q4 2807 2753 2757 2753
q5 9850 9812 9798 9798
q6 247 122 123 122
q7 3073 2451 2495 2451
q8 4849 4815 4853 4815
q9 13071 13003 12964 12964
q10 4086 4177 4150 4150
q11 850 655 652 652
q12 988 810 805 805
q13 4294 3899 3859 3859
q14 365 339 357 339
q15 617 545 533 533
q16 748 713 693 693
q17 3893 3840 3837 3837
q18 9627 9357 9467 9357
q19 1841 1799 1786 1786
q20 2405 2040 2062 2040
q21 8926 8794 8787 8787
q22 913 854 816 816
Total cold run time: 82808 ms
Total hot run time: 79797 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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1809666636
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on code in PR #26827:
URL: https://github.com/apache/doris/pull/26827#discussion_r1402105007
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/TypeCoercionUtils.java:
##########
@@ -412,6 +412,11 @@ private static Expression unSafeCast(Expression input, DataType dataType) {
return promoted;
}
}
+ // adapt scale when from string to datetimev2 with float
+ if (type.isStringLikeType() && dataType.isDateTimeV2Type()) {
+ return recordTypeCoercionForSubQuery(input,
+ DateTimeV2Type.forTypeFromString(((Literal) input).getStringValue()));
Review Comment:
In my opinion, casting a string literal to datetime literal is always correct if the casting doesn't lose any information.
If we have to compare a literal with a column, there's two probability:
1. they could compare directly, like `datetimev2(3)` and `datetimev2(6)`. It doesn't matter.
2. they couldn't compare directly, like `datetimev2(3)` and `varchar`. then we must do a new cast between at least one of them.
No matter which one, the second step of conversion(if have) for comparing has nothing to do with the conversion from string to datelike type which doesn't lose information. what you concerned about should be done in the step 2. I'll add some regression-test to prove and ensure this.
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #26827:
URL: https://github.com/apache/doris/pull/26827#discussion_r1390349704
##########
be/src/vec/functions/function_timestamp.cpp:
##########
@@ -17,24 +17,29 @@
#include <glog/logging.h>
Review Comment:
warning: 'glog/logging.h' file not found [clang-diagnostic-error]
```cpp
#include <glog/logging.h>
^
```
##########
be/src/vec/functions/function_timestamp.cpp:
##########
@@ -570,6 +576,99 @@
struct UnixTimeStampDateImpl {
static DataTypes get_variadic_argument_types() { return {std::make_shared<DateType>()}; }
+ static DataTypePtr get_return_type_impl(const ColumnsWithTypeAndName& arguments) {
+ if constexpr (std::is_same_v<DateType, DataTypeDateTimeV2>) {
+ if (arguments[0].type->is_nullable()) {
+ UInt32 scale = static_cast<const DataTypeNullable*>(arguments[0].type.get())
+ ->get_nested_type()
+ ->get_scale();
+ return make_nullable(
+ std::make_shared<DataTypeDecimal<Decimal64>>(10 + scale, scale));
Review Comment:
warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers]
```cpp
std::make_shared<DataTypeDecimal<Decimal64>>(10 + scale, scale));
^
```
##########
be/src/vec/functions/function_timestamp.cpp:
##########
@@ -570,6 +576,99 @@
struct UnixTimeStampDateImpl {
static DataTypes get_variadic_argument_types() { return {std::make_shared<DateType>()}; }
+ static DataTypePtr get_return_type_impl(const ColumnsWithTypeAndName& arguments) {
+ if constexpr (std::is_same_v<DateType, DataTypeDateTimeV2>) {
+ if (arguments[0].type->is_nullable()) {
+ UInt32 scale = static_cast<const DataTypeNullable*>(arguments[0].type.get())
+ ->get_nested_type()
+ ->get_scale();
+ return make_nullable(
+ std::make_shared<DataTypeDecimal<Decimal64>>(10 + scale, scale));
+ }
+ UInt32 scale = arguments[0].type->get_scale();
+ return std::make_shared<DataTypeDecimal<Decimal64>>(10 + scale, scale);
Review Comment:
warning: 10 is a magic number; consider replacing it with a named constant [readability-magic-numbers]
```cpp
return std::make_shared<DataTypeDecimal<Decimal64>>(10 + scale, scale);
^
```
##########
be/src/vec/functions/function_timestamp.cpp:
##########
@@ -773,6 +925,13 @@
return Impl::get_variadic_argument_types();
}
+ bool use_default_implementation_for_nulls() const override {
+ if constexpr (std::is_same_v<Impl, UnixTimeStampStrImpl>){
+ return false;
Review Comment:
warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
be/src/vec/functions/function_timestamp.cpp:928:
```diff
- if constexpr (std::is_same_v<Impl, UnixTimeStampStrImpl>){
- return false;
- }
- return true;
+ return !std::is_same_v<Impl, UnixTimeStampStrImpl>;
```
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1807226206
(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 44.55 seconds
stream load tsv: 555 seconds loaded 74807831229 Bytes, about 128 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 34 seconds loaded 861443392 Bytes, about 24 MB/s
insert into select: 29.1 seconds inserted 10000000 Rows, about 343K ops/s
storage size: 17162209543 Bytes
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #26827:
URL: https://github.com/apache/doris/pull/26827#discussion_r1402474724
##########
be/src/vec/functions/function_timestamp.cpp:
##########
@@ -773,6 +930,13 @@ class FunctionUnixTimestamp : public IFunction {
return Impl::get_variadic_argument_types();
}
+ bool use_default_implementation_for_nulls() const override {
+ if constexpr (std::is_same_v<Impl, UnixTimeStampStrImpl>) {
+ return false;
Review Comment:
warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
be/src/vec/functions/function_timestamp.cpp:933:
```diff
- if constexpr (std::is_same_v<Impl, UnixTimeStampStrImpl>) {
- return false;
- }
- return true;
+ return !std::is_same_v<Impl, UnixTimeStampStrImpl>;
```
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1823570385
(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 42.71 seconds
stream load tsv: 564 seconds loaded 74807831229 Bytes, about 126 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.5 seconds inserted 10000000 Rows, about 350K ops/s
storage size: 17099109445 Bytes
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #26827:
URL: https://github.com/apache/doris/pull/26827#discussion_r1403421697
##########
be/src/vec/functions/function_timestamp.cpp:
##########
@@ -777,6 +939,13 @@ class FunctionUnixTimestamp : public IFunction {
return Impl::get_variadic_argument_types();
}
+ bool use_default_implementation_for_nulls() const override {
+ if constexpr (std::is_same_v<Impl, UnixTimeStampStrImpl>) {
+ return false;
Review Comment:
warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
be/src/vec/functions/function_timestamp.cpp:942:
```diff
- if constexpr (std::is_same_v<Impl, UnixTimeStampStrImpl>) {
- return false;
- }
- return true;
+ return !std::is_same_v<Impl, UnixTimeStampStrImpl>;
```
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1809484734
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1826092121
<details>
<summary>TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'</summary>
```
Tpch sf100 test result on commit a414dbbf98c46aa672fc91e44659650cf7ffeb58, data reload: false
run tpch-sf100 query with default conf and session variables
q1 4920 4692 4664 4664
q2 359 169 157 157
q3 2041 1935 1858 1858
q4 1391 1259 1252 1252
q5 3943 3953 4013 3953
q6 247 136 138 136
q7 1429 897 881 881
q8 2766 2790 2774 2774
q9 9727 9628 9468 9468
q10 3456 3525 3524 3524
q11 386 249 250 249
q12 440 290 286 286
q13 4574 3811 3814 3811
q14 315 286 288 286
q15 580 535 529 529
q16 664 574 592 574
q17 1149 999 903 903
q18 7657 7248 7403 7248
q19 1693 1647 1675 1647
q20 566 316 317 316
q21 4303 3928 3943 3928
q22 479 377 385 377
Total cold run time: 53085 ms
Total hot run time: 48821 ms
run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1 4576 4578 4577 4577
q2 361 222 268 222
q3 4017 4009 3990 3990
q4 2685 2679 2711 2679
q5 9698 9691 9677 9677
q6 237 125 125 125
q7 2992 2450 2410 2410
q8 4428 4421 4410 4410
q9 13038 12928 12857 12857
q10 4065 4158 4144 4144
q11 771 670 660 660
q12 998 812 797 797
q13 4286 3583 3630 3583
q14 407 330 341 330
q15 587 522 530 522
q16 726 659 669 659
q17 3856 3893 3933 3893
q18 9424 8924 8932 8924
q19 1804 1790 1790 1790
q20 2397 2073 2032 2032
q21 8754 8959 8589 8589
q22 890 836 761 761
Total cold run time: 80997 ms
Total hot run time: 77631 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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on code in PR #26827:
URL: https://github.com/apache/doris/pull/26827#discussion_r1403416523
##########
be/src/vec/functions/function_timestamp.cpp:
##########
@@ -570,6 +576,100 @@ template <typename DateType>
struct UnixTimeStampDateImpl {
static DataTypes get_variadic_argument_types() { return {std::make_shared<DateType>()}; }
+ static DataTypePtr get_return_type_impl(const ColumnsWithTypeAndName& arguments) {
+ if constexpr (std::is_same_v<DateType, DataTypeDateTimeV2>) {
+ if (arguments[0].type->is_nullable()) {
+ UInt32 scale = static_cast<const DataTypeNullable*>(arguments[0].type.get())
+ ->get_nested_type()
+ ->get_scale();
+ return make_nullable(
+ std::make_shared<DataTypeDecimal<Decimal64>>(10 + scale, scale));
+ }
+ UInt32 scale = arguments[0].type->get_scale();
+ return std::make_shared<DataTypeDecimal<Decimal64>>(10 + scale, scale);
+ } else {
+ if (arguments[0].type->is_nullable()) {
+ return make_nullable(std::make_shared<DataTypeInt32>());
+ }
+ return std::make_shared<DataTypeInt32>();
+ }
+ }
+
+ static Status execute_impl(FunctionContext* context, Block& block,
+ const ColumnNumbers& arguments, size_t result,
+ size_t input_rows_count) {
+ const ColumnPtr& col_source = block.get_by_position(arguments[0]).column;
+ DCHECK(!col_source->is_nullable());
+
+ if constexpr (std::is_same_v<DateType, DataTypeDate> ||
+ std::is_same_v<DateType, DataTypeDateTime>) {
+ auto col_result = ColumnVector<Int32>::create();
+ auto& col_result_data = col_result->get_data();
+ col_result->resize(input_rows_count);
+
+ for (int i = 0; i < input_rows_count; i++) {
+ StringRef source = col_source->get_data_at(i);
Review Comment:
done
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1809822403
(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.13 seconds
stream load tsv: 549 seconds loaded 74807831229 Bytes, about 129 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.6 seconds inserted 10000000 Rows, about 349K ops/s
storage size: 17096784072 Bytes
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1811801465
(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.33 seconds
stream load tsv: 555 seconds loaded 74807831229 Bytes, about 128 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.6 seconds inserted 10000000 Rows, about 349K ops/s
storage size: 17097682031 Bytes
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1824617692
<details>
<summary>TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'</summary>
```
Tpch sf100 test result on commit 68f4e65e5434ab32d9257966801f72c13af163a5, data reload: false
run tpch-sf100 query with default conf and session variables
q1 4889 4663 4610 4610
q2 356 159 157 157
q3 2026 1935 1871 1871
q4 1393 1260 1278 1260
q5 3968 3962 3997 3962
q6 244 127 121 121
q7 1428 875 880 875
q8 2793 2797 2783 2783
q9 9882 9490 9395 9395
q10 3450 3515 3523 3515
q11 379 255 242 242
q12 429 296 292 292
q13 4566 3788 3843 3788
q14 322 293 291 291
q15 595 533 529 529
q16 653 583 587 583
q17 1146 960 954 954
q18 7832 7358 7455 7358
q19 1670 1675 1688 1675
q20 543 306 305 305
q21 4429 3938 3976 3938
q22 460 380 360 360
Total cold run time: 53453 ms
Total hot run time: 48864 ms
run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1 4561 4567 4560 4560
q2 344 234 249 234
q3 4016 3989 3976 3976
q4 2699 2685 2690 2685
q5 9674 9553 9626 9553
q6 249 124 124 124
q7 3030 2471 2459 2459
q8 4468 4486 4458 4458
q9 13029 12837 12804 12804
q10 4062 4183 4169 4169
q11 793 668 639 639
q12 976 838 808 808
q13 4292 3525 3518 3518
q14 381 359 340 340
q15 568 505 525 505
q16 742 691 668 668
q17 3878 3916 3911 3911
q18 9634 9128 8911 8911
q19 1836 1784 1781 1781
q20 2377 2053 2034 2034
q21 8827 8498 8553 8498
q22 900 795 811 795
Total cold run time: 81336 ms
Total hot run time: 77430 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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1826033934
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1807043578
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1810750023
(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.02 seconds
stream load tsv: 548 seconds loaded 74807831229 Bytes, about 130 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.7 seconds inserted 10000000 Rows, about 348K ops/s
storage size: 17096786801 Bytes
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1823430986
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "Gabriel39 (via GitHub)" <gi...@apache.org>.
Gabriel39 merged PR #26827:
URL: https://github.com/apache/doris/pull/26827
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1807038167
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #26827:
URL: https://github.com/apache/doris/pull/26827#discussion_r1392781370
##########
be/src/vec/functions/function_timestamp.cpp:
##########
@@ -773,6 +926,13 @@ class FunctionUnixTimestamp : public IFunction {
return Impl::get_variadic_argument_types();
}
+ bool use_default_implementation_for_nulls() const override {
+ if constexpr (std::is_same_v<Impl, UnixTimeStampStrImpl>) {
+ return false;
Review Comment:
warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
be/src/vec/functions/function_timestamp.cpp:929:
```diff
- if constexpr (std::is_same_v<Impl, UnixTimeStampStrImpl>) {
- return false;
- }
- return true;
+ return !std::is_same_v<Impl, UnixTimeStampStrImpl>;
```
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1811724996
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1810440401
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1826096727
(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.06 seconds
stream load tsv: 568 seconds loaded 74807831229 Bytes, about 125 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 33.0 seconds inserted 10000000 Rows, about 303K ops/s
storage size: 17101086248 Bytes
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1807386337
TeamCity be ut coverage result:
Function Coverage: 36.77% (8405/22860)
Line Coverage: 29.27% (68153/232834)
Region Coverage: 27.90% (35220/126235)
Branch Coverage: 24.72% (18010/72846)
Coverage Report: http://coverage.selectdb-in.cc/coverage/b6c7a2a0ab0f78d9ab27b76f2d7d18c3ea34ba5a_b6c7a2a0ab0f78d9ab27b76f2d7d18c3ea34ba5a/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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1809765998
TeamCity be ut coverage result:
Function Coverage: 36.73% (8419/22921)
Line Coverage: 29.25% (68399/233832)
Region Coverage: 27.86% (35352/126906)
Branch Coverage: 24.65% (18068/73296)
Coverage Report: http://coverage.selectdb-in.cc/coverage/cf9ce8f52f93fd62d0ba537c2e03c7d73892dae3_cf9ce8f52f93fd62d0ba537c2e03c7d73892dae3/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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1810660467
TeamCity be ut coverage result:
Function Coverage: 36.73% (8419/22924)
Line Coverage: 29.25% (68399/233849)
Region Coverage: 27.85% (35343/126916)
Branch Coverage: 24.65% (18069/73308)
Coverage Report: http://coverage.selectdb-in.cc/coverage/e2ab2a563a228b476093966e720af3bed2844858_e2ab2a563a228b476093966e720af3bed2844858/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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1807060008
TeamCity be ut coverage result:
Function Coverage: 36.78% (8408/22860)
Line Coverage: 29.26% (68136/232835)
Region Coverage: 27.90% (35223/126235)
Branch Coverage: 24.72% (18009/72846)
Coverage Report: http://coverage.selectdb-in.cc/coverage/de91357914a34ef18ea3e6b65318791a0a34b0c1_de91357914a34ef18ea3e6b65318791a0a34b0c1/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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "BiteTheDDDDt (via GitHub)" <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #26827:
URL: https://github.com/apache/doris/pull/26827#discussion_r1402860299
##########
be/src/vec/functions/function_timestamp.cpp:
##########
@@ -570,6 +576,100 @@ template <typename DateType>
struct UnixTimeStampDateImpl {
static DataTypes get_variadic_argument_types() { return {std::make_shared<DateType>()}; }
+ static DataTypePtr get_return_type_impl(const ColumnsWithTypeAndName& arguments) {
+ if constexpr (std::is_same_v<DateType, DataTypeDateTimeV2>) {
+ if (arguments[0].type->is_nullable()) {
+ UInt32 scale = static_cast<const DataTypeNullable*>(arguments[0].type.get())
+ ->get_nested_type()
+ ->get_scale();
+ return make_nullable(
+ std::make_shared<DataTypeDecimal<Decimal64>>(10 + scale, scale));
+ }
+ UInt32 scale = arguments[0].type->get_scale();
+ return std::make_shared<DataTypeDecimal<Decimal64>>(10 + scale, scale);
+ } else {
+ if (arguments[0].type->is_nullable()) {
+ return make_nullable(std::make_shared<DataTypeInt32>());
+ }
+ return std::make_shared<DataTypeInt32>();
+ }
+ }
+
+ static Status execute_impl(FunctionContext* context, Block& block,
+ const ColumnNumbers& arguments, size_t result,
+ size_t input_rows_count) {
+ const ColumnPtr& col_source = block.get_by_position(arguments[0]).column;
+ DCHECK(!col_source->is_nullable());
+
+ if constexpr (std::is_same_v<DateType, DataTypeDate> ||
+ std::is_same_v<DateType, DataTypeDateTime>) {
+ auto col_result = ColumnVector<Int32>::create();
+ auto& col_result_data = col_result->get_data();
+ col_result->resize(input_rows_count);
+
+ for (int i = 0; i < input_rows_count; i++) {
+ StringRef source = col_source->get_data_at(i);
Review Comment:
cast col_source as column datetime?
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1823215285
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1823218294
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1809102011
<details>
<summary>TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'</summary>
```
Tpch sf100 test result on commit ca07372e6a3951b5097001373e3c90fe607ac1c1, data reload: false
run tpch-sf100 query with default conf and session variables
q1 5347 5112 5172 5112
q2 362 148 163 148
q3 2035 1976 1991 1976
q4 1406 1350 1348 1348
q5 3972 3960 3971 3960
q6 254 129 132 129
q7 1459 883 902 883
q8 2773 2788 2776 2776
q9 9572 9389 9498 9389
q10 3482 3542 3534 3534
q11 393 250 258 250
q12 436 279 283 279
q13 4572 4115 4133 4115
q14 318 288 291 288
q15 642 565 534 534
q16 683 594 578 578
q17 1133 1074 1078 1074
q18 8082 7689 7587 7587
q19 1666 1674 1674 1674
q20 583 312 296 296
q21 4679 4362 4377 4362
q22 525 420 423 420
Total cold run time: 54374 ms
Total hot run time: 50712 ms
run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1 5042 5133 5329 5133
q2 327 217 246 217
q3 4073 4036 3910 3910
q4 2812 2781 2782 2781
q5 9698 9620 9715 9620
q6 248 127 126 126
q7 3027 2484 2566 2484
q8 4852 4928 4855 4855
q9 13060 13007 12901 12901
q10 4100 4164 4163 4163
q11 778 636 709 636
q12 1051 829 828 828
q13 4315 3865 3850 3850
q14 375 348 352 348
q15 639 583 547 547
q16 806 701 720 701
q17 3932 3830 3879 3830
q18 9781 9363 9396 9363
q19 1809 1777 1765 1765
q20 2393 2072 2054 2054
q21 9117 8922 8878 8878
q22 925 896 896 896
Total cold run time: 83160 ms
Total hot run time: 79886 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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1809124676
(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 46.15 seconds
stream load tsv: 554 seconds loaded 74807831229 Bytes, about 128 MB/s
stream load json: 20 seconds loaded 2358488459 Bytes, about 112 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 29.0 seconds inserted 10000000 Rows, about 344K ops/s
storage size: 17162275059 Bytes
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1811778187
TeamCity be ut coverage result:
Function Coverage: 36.79% (8420/22885)
Line Coverage: 29.27% (68414/233732)
Region Coverage: 27.87% (35360/126858)
Branch Coverage: 24.64% (18067/73310)
Coverage Report: http://coverage.selectdb-in.cc/coverage/1fd88e7a54d0cd77eab011684473299a2c414c79_1fd88e7a54d0cd77eab011684473299a2c414c79/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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1812804946
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1809825566
<details>
<summary>TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'</summary>
```
Tpch sf100 test result on commit cf9ce8f52f93fd62d0ba537c2e03c7d73892dae3, data reload: false
run tpch-sf100 query with default conf and session variables
q1 5324 5146 5175 5146
q2 358 165 158 158
q3 2053 1999 2013 1999
q4 1405 1362 1381 1362
q5 3972 3949 4077 3949
q6 261 130 129 129
q7 1467 884 901 884
q8 2768 2778 2773 2773
q9 9954 9495 9421 9421
q10 3455 3541 3550 3541
q11 380 264 268 264
q12 437 282 280 280
q13 4590 4122 4085 4085
q14 331 292 297 292
q15 627 556 544 544
q16 701 586 587 586
q17 1123 1073 1068 1068
q18 8142 7643 7632 7632
q19 1675 1680 1681 1680
q20 533 307 279 279
q21 4725 4419 4415 4415
q22 512 423 408 408
Total cold run time: 54793 ms
Total hot run time: 50895 ms
run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1 5078 5057 5061 5057
q2 327 219 232 219
q3 4071 4097 4056 4056
q4 2796 2767 2757 2757
q5 9624 9682 9615 9615
q6 247 122 125 122
q7 3051 2511 2516 2511
q8 4821 4772 4870 4772
q9 13012 12864 12968 12864
q10 4075 4174 4194 4174
q11 783 676 634 634
q12 992 818 846 818
q13 4286 3862 3857 3857
q14 391 355 364 355
q15 592 539 552 539
q16 780 665 697 665
q17 3875 3917 3859 3859
q18 9694 9443 9366 9366
q19 1889 1778 1765 1765
q20 2399 2075 2043 2043
q21 8768 9023 8883 8883
q22 908 855 879 855
Total cold run time: 82459 ms
Total hot run time: 79786 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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on code in PR #26827:
URL: https://github.com/apache/doris/pull/26827#discussion_r1393732400
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/UnixTimestamp.java:
##########
@@ -81,7 +84,28 @@ public boolean nullable() {
if (arity() == 0) {
return false;
}
- return PropagateNullableOnDateLikeV2Args.super.nullable();
Review Comment:
remove PropagateNullableOnDateLikeV2Args trait from this class
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/UnixTimestamp.java:
##########
@@ -42,9 +44,10 @@
public class UnixTimestamp extends ScalarFunction
implements ExplicitlyCastableSignature, PropagateNullableOnDateLikeV2Args, Nondeterministic {
+ // we got changes in @{computeSignature}
Review Comment:
use java doc format comment
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/UnixTimestamp.java:
##########
@@ -42,9 +44,10 @@
public class UnixTimestamp extends ScalarFunction
implements ExplicitlyCastableSignature, PropagateNullableOnDateLikeV2Args, Nondeterministic {
+ // we got changes in @{computeSignature}
private static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
FunctionSignature.ret(IntegerType.INSTANCE).args(),
- FunctionSignature.ret(IntegerType.INSTANCE).args(DateTimeV2Type.SYSTEM_DEFAULT),
+ FunctionSignature.ret(DecimalV3Type.createDecimalV3Type(16, 6)).args(DateTimeV2Type.SYSTEM_DEFAULT),
Review Comment:
should update return type of
```java
FunctionSignature.ret(IntegerType.INSTANCE).args(VarcharType.SYSTEM_DEFAULT, VarcharType.SYSTEM_DEFAULT),
FunctionSignature.ret(IntegerType.INSTANCE).args(StringType.INSTANCE, StringType.INSTANCE)
```
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/TypeCoercionUtils.java:
##########
@@ -412,6 +412,11 @@ private static Expression unSafeCast(Expression input, DataType dataType) {
return promoted;
}
}
+ // adapt scale when from string to datetimev2 with float
+ if (type.isStringLikeType() && dataType.isDateTimeV2Type()) {
+ return recordTypeCoercionForSubQuery(input,
+ DateTimeV2Type.forTypeFromString(((Literal) input).getStringValue()));
Review Comment:
should not do this, this will lead to wrong type coercion. think about this scene. `IF(a = b, datetimev2(6)_col, string_literal_with_scale_3)`. then the expression will be erwrite to `IF(a = b, datetimev2(6)_col, cast(string_literal_with_scale_3 as datetimev2(3)))`. this is not right. string_literal should always return scale with 6 to compatible with string column.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/UnixTimestamp.java:
##########
@@ -81,7 +84,28 @@ public boolean nullable() {
if (arity() == 0) {
return false;
}
- return PropagateNullableOnDateLikeV2Args.super.nullable();
+ if (arity() == 1) {
+ return child(0).nullable();
+ }
+ if (arity() == 2 && child(0).getDataType().isStringLikeType() && child(1).getDataType().isStringLikeType()) {
+ return true;
+ }
+ return child(0).nullable() || child(1).nullable();
Review Comment:
add comment to explain the nullable logic
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/DateTimeExtractAndTransform.java:
##########
@@ -494,9 +496,13 @@ public static Expression unixTimestamp(DateV2Literal date) {
return new IntegerLiteral(getTimestamp(date.toJavaDateType()));
}
- @ExecFunction(name = "unix_timestamp", argTypes = {"DATETIMEV2"}, returnType = "INT")
+ @ExecFunction(name = "unix_timestamp", argTypes = { "DATETIMEV2" }, returnType = "DECIMALV3")
public static Expression unixTimestamp(DateTimeV2Literal date) {
- return new IntegerLiteral(getTimestamp(date.toJavaDateType()));
+ if (date.getMicroSecond() == 0) {
+ return new DecimalV3Literal(new BigDecimal(getTimestamp(date.toJavaDateType()).toString()));
+ }
+ String val = getTimestamp(date.toJavaDateType()).toString() + "." + date.getMicrosecondString();
+ return new DecimalV3Literal(new BigDecimal(val));
Review Comment:
u should create DecimalV3Literal with DecimalV3Type explicitly, because this ctor do not ensure return same precision and scale decimal with original expression. this may lead to wrong result or be crash
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/UnixTimestamp.java:
##########
@@ -81,7 +84,28 @@ public boolean nullable() {
if (arity() == 0) {
return false;
}
- return PropagateNullableOnDateLikeV2Args.super.nullable();
+ if (arity() == 1) {
+ return child(0).nullable();
+ }
+ if (arity() == 2 && child(0).getDataType().isStringLikeType() && child(1).getDataType().isStringLikeType()) {
+ return true;
+ }
+ return child(0).nullable() || child(1).nullable();
+ }
+
+ @Override
+ public FunctionSignature computeSignature(FunctionSignature signature) {
+ if (arity() != 1) {
+ return signature.withReturnType(IntegerType.INSTANCE);
Review Comment:
just return original signature is ok
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1823340926
TeamCity be ut coverage result:
Function Coverage: 36.56% (8450/23112)
Line Coverage: 28.85% (68675/238073)
Region Coverage: 27.82% (35525/127678)
Branch Coverage: 24.56% (18121/73784)
Coverage Report: http://coverage.selectdb-in.cc/coverage/7f798dc4dcd3ebe3735007b5ee105ade9f186201_7f798dc4dcd3ebe3735007b5ee105ade9f186201/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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1809067712
TeamCity be ut coverage result:
Function Coverage: 36.74% (8406/22878)
Line Coverage: 29.27% (68148/232859)
Region Coverage: 27.84% (35181/126351)
Branch Coverage: 24.67% (17984/72904)
Coverage Report: http://coverage.selectdb-in.cc/coverage/ca07372e6a3951b5097001373e3c90fe607ac1c1_ca07372e6a3951b5097001373e3c90fe607ac1c1/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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1812804813
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1809540542
TeamCity be ut coverage result:
Function Coverage: 36.66% (8384/22870)
Line Coverage: 29.23% (68062/232867)
Region Coverage: 27.84% (35170/126342)
Branch Coverage: 24.67% (17984/72906)
Coverage Report: http://coverage.selectdb-in.cc/coverage/8560775102dadb67f3f0fadc553d4062d91d8a84_8560775102dadb67f3f0fadc553d4062d91d8a84/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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1809565725
(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 44.2 seconds
stream load tsv: 557 seconds loaded 74807831229 Bytes, about 128 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.8 seconds inserted 10000000 Rows, about 347K ops/s
storage size: 17161265004 Bytes
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1824633512
(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 45.29 seconds
stream load tsv: 585 seconds loaded 74807831229 Bytes, about 121 MB/s
stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
stream load orc: 65 seconds loaded 1101869774 Bytes, about 16 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
insert into select: 28.7 seconds inserted 10000000 Rows, about 348K ops/s
storage size: 17161944773 Bytes
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1823561630
<details>
<summary>TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'</summary>
```
Tpch sf100 test result on commit e45f7c2cc41adbe564505ccc1b523254d7f06068, data reload: false
run tpch-sf100 query with default conf and session variables
q1 4936 4679 4647 4647
q2 360 154 159 154
q3 2039 1976 1905 1905
q4 1385 1254 1217 1217
q5 3954 3923 4028 3923
q6 250 127 135 127
q7 1437 894 877 877
q8 2791 2799 2791 2791
q9 10290 9622 9483 9483
q10 3451 3506 3510 3506
q11 387 240 238 238
q12 439 288 294 288
q13 4560 3798 3847 3798
q14 311 292 292 292
q15 588 527 519 519
q16 662 578 585 578
q17 1143 954 917 917
q18 7777 7296 7517 7296
q19 1687 1694 1692 1692
q20 535 332 324 324
q21 4418 4012 4016 4012
q22 473 380 378 378
Total cold run time: 53873 ms
Total hot run time: 48962 ms
run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1 4623 4566 4558 4558
q2 330 235 247 235
q3 4038 3980 4000 3980
q4 2713 2700 2693 2693
q5 9544 9672 9639 9639
q6 248 122 125 122
q7 3038 2498 2476 2476
q8 4464 4423 4489 4423
q9 12983 12790 12803 12790
q10 4100 4164 4194 4164
q11 760 658 668 658
q12 977 811 811 811
q13 4275 3594 3556 3556
q14 395 336 344 336
q15 577 518 533 518
q16 736 683 666 666
q17 3860 3884 3937 3884
q18 9605 8913 9082 8913
q19 1882 1807 1805 1805
q20 2399 2072 2049 2049
q21 8821 8603 8470 8470
q22 861 875 772 772
Total cold run time: 81229 ms
Total hot run time: 77518 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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1826254519
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #26827:
URL: https://github.com/apache/doris/pull/26827#discussion_r1390413390
##########
be/src/vec/functions/function_timestamp.cpp:
##########
@@ -773,6 +925,13 @@ class FunctionUnixTimestamp : public IFunction {
return Impl::get_variadic_argument_types();
}
+ bool use_default_implementation_for_nulls() const override {
+ if constexpr (std::is_same_v<Impl, UnixTimeStampStrImpl>) {
+ return false;
Review Comment:
warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]
be/src/vec/functions/function_timestamp.cpp:928:
```diff
- if constexpr (std::is_same_v<Impl, UnixTimeStampStrImpl>) {
- return false;
- }
- return true;
+ return !std::is_same_v<Impl, UnixTimeStampStrImpl>;
```
--
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1807130417
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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1807223792
<details>
<summary>TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'</summary>
```
Tpch sf100 test result on commit b6c7a2a0ab0f78d9ab27b76f2d7d18c3ea34ba5a, data reload: false
run tpch-sf100 query with default conf and session variables
q1 5268 5061 5194 5061
q2 366 186 204 186
q3 2067 2010 2013 2010
q4 1469 1436 1420 1420
q5 4126 4169 4083 4083
q6 255 138 137 137
q7 2076 1616 1626 1616
q8 2756 2737 2753 2737
q9 10534 10387 10296 10296
q10 10264 3576 3545 3545
q11 369 249 252 249
q12 456 299 295 295
q13 4529 4112 4143 4112
q14 328 292 315 292
q15 657 561 576 561
q16 688 620 601 601
q17 1144 1095 1089 1089
q18 7824 7453 7484 7453
q19 1734 1706 1703 1703
q20 593 365 363 363
q21 4926 4571 4561 4561
q22 541 418 440 418
Total cold run time: 62970 ms
Total hot run time: 52788 ms
run tpch-sf100 query with default conf and set session variable runtime_filter_mode=off
q1 4954 5061 4970 4970
q2 342 248 271 248
q3 4068 3977 3928 3928
q4 2769 2762 2753 2753
q5 6523 6414 6437 6414
q6 246 129 128 128
q7 3167 2700 2659 2659
q8 4756 4734 4769 4734
q9 17811 17732 17603 17603
q10 4082 4180 4162 4162
q11 726 645 639 639
q12 1037 834 819 819
q13 4303 3896 3878 3878
q14 389 341 342 341
q15 654 554 565 554
q16 777 672 690 672
q17 3877 3924 3952 3924
q18 9411 8988 9384 8988
q19 1845 1784 1762 1762
q20 2374 2039 2048 2039
q21 8827 8603 8654 8603
q22 933 888 896 888
Total cold run time: 83871 ms
Total hot run time: 80706 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] [Enhancement](function) support unix_timestamp with float [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #26827:
URL: https://github.com/apache/doris/pull/26827#issuecomment-1824471537
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