You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "zhiqiang-hhhh (via GitHub)" <gi...@apache.org> on 2024/03/11 14:17:23 UTC
[PR] [fix](datetime) fix datetime rounding on BE [doris]
zhiqiang-hhhh opened a new pull request, #32075:
URL: https://github.com/apache/doris/pull/32075
(no comment)
--
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "zhiqiang-hhhh (via GitHub)" <gi...@apache.org>.
zhiqiang-hhhh commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1988552316
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "zhiqiang-hhhh (via GitHub)" <gi...@apache.org>.
zhiqiang-hhhh commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1988576855
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "zhiqiang-hhhh (via GitHub)" <gi...@apache.org>.
zhiqiang-hhhh commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991082649
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #32075:
URL: https://github.com/apache/doris/pull/32075#discussion_r1519816042
##########
be/src/vec/runtime/vdatetime_value.cpp:
##########
@@ -1988,13 +1989,13 @@ bool DateV2Value<T>::from_date_str(const char* date_str, int len,
template <typename T>
bool DateV2Value<T>::from_date_str_base(const char* date_str, int len, int scale,
Review Comment:
warning: function 'from_date_str_base' has cognitive complexity of 89 (threshold 50) [readability-function-cognitive-complexity]
```cpp
bool DateV2Value<T>::from_date_str_base(const char* date_str, int len, int scale,
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/runtime/vdatetime_value.cpp:2000:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
while (ptr < end && isspace(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2000:** +1
```cpp
while (ptr < end && isspace(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2003:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (ptr == end || !isdigit(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2003:** +1
```cpp
if (ptr == end || !isdigit(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2008:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
while (pos < end && (isdigit(*pos) || *pos == 'T')) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2008:** +1
```cpp
while (pos < end && (isdigit(*pos) || *pos == 'T')) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2008:** +1
```cpp
while (pos < end && (isdigit(*pos) || *pos == 'T')) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2018:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (pos == end || *pos == '.' ||
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2018:** +1
```cpp
if (pos == end || *pos == '.' ||
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2020:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (digits == 4 || digits == 8 || digits >= 14) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2020:** +1
```cpp
if (digits == 4 || digits == 8 || digits >= 14) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2022:** +1, nesting level increased to 2
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2031:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
while (ptr < end && isdigit(*ptr) && field_idx < MAX_DATE_PARTS) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2031:** +1
```cpp
while (ptr < end && isdigit(*ptr) && field_idx < MAX_DATE_PARTS) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2034:** +1
```cpp
bool scan_to_delim = (!is_interval_format) && (field_idx != 6);
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2035:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
while (ptr < end && isdigit(*ptr) && (scan_to_delim || field_len--)) { // field_len <= 7
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2035:** +1
```cpp
while (ptr < end && isdigit(*ptr) && (scan_to_delim || field_len--)) { // field_len <= 7
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2035:** +1
```cpp
while (ptr < end && isdigit(*ptr) && (scan_to_delim || field_len--)) { // field_len <= 7
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2039:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if constexpr (is_datetime) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2044:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (field_idx == 6 && scale >= 0) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2044:** +1
```cpp
if (field_idx == 6 && scale >= 0) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2055:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (reminder >= 5 * normalizer) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2060:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (temp_val == int_exp10(7)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2063:** +1, nesting level increased to 4
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2070:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (temp_val > 999999L) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2075:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (field_idx == 6) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2079:** +1, nesting level increased to 2
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2085:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (ptr == end) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2091:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (UNLIKELY((field_idx > 2 ||
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2093:** +1
```cpp
&& time_zone_begins(ptr, end))) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2091:** +1
```cpp
if (UNLIKELY((field_idx > 2 ||
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2094:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (local_time_zone == nullptr) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2097:** nesting level increased to 3
```cpp
auto get_tz_offset = [&](const std::string& str_tz,
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2100:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (!TimezoneUtils::find_cctz_time_zone(str_tz, given_tz)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2111:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
} catch ([[maybe_unused]] Exception& e) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2118:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (field_idx == 2 && *ptr == 'T') {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2118:** +1
```cpp
if (field_idx == 2 && *ptr == 'T') {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2126:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (field_idx == 5) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2127:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (*ptr == '.') {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2130:** +1, nesting level increased to 3
```cpp
} else if (isdigit(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2138:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
while (ptr < end && (ispunct(*ptr) || isspace(*ptr))) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2138:** +1
```cpp
while (ptr < end && (ispunct(*ptr) || isspace(*ptr))) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2138:** +1
```cpp
while (ptr < end && (ispunct(*ptr) || isspace(*ptr))) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2139:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (isspace(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2140:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (((1 << field_idx) & allow_space_mask) == 0) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2144:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (*ptr == '-') {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2152:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (!is_interval_format) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2155:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
for (; field_idx < MAX_DATE_PARTS; ++field_idx) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2159:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (year_len == 2) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2160:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (date_val[0] < YY_PART_YEAR) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2162:** +1, nesting level increased to 2
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2167:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (num_field < 3) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2170:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (is_invalid(date_val[0], date_val[1], date_val[2], 0, 0, 0, 0)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2174:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (!check_range_and_set_time(date_val[0], date_val[1], date_val[2], date_val[3], date_val[4],
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2179:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
return sec_offset ? date_add_interval<TimeUnit::SECOND>(
^
```
</details>
##########
be/test/vec/data_types/datetime_round_test.cpp:
##########
@@ -0,0 +1,391 @@
+// 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 <gen_cpp/Exprs_types.h>
Review Comment:
warning: 'gen_cpp/Exprs_types.h' file not found [clang-diagnostic-error]
```cpp
#include <gen_cpp/Exprs_types.h>
^
```
--
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #32075:
URL: https://github.com/apache/doris/pull/32075#discussion_r1519824785
##########
be/src/vec/runtime/vdatetime_value.cpp:
##########
@@ -1988,13 +1989,13 @@ bool DateV2Value<T>::from_date_str(const char* date_str, int len,
template <typename T>
bool DateV2Value<T>::from_date_str_base(const char* date_str, int len, int scale,
Review Comment:
warning: function 'from_date_str_base' has cognitive complexity of 95 (threshold 50) [readability-function-cognitive-complexity]
```cpp
bool DateV2Value<T>::from_date_str_base(const char* date_str, int len, int scale,
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/runtime/vdatetime_value.cpp:2000:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
while (ptr < end && isspace(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2000:** +1
```cpp
while (ptr < end && isspace(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2003:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (ptr == end || !isdigit(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2003:** +1
```cpp
if (ptr == end || !isdigit(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2008:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
while (pos < end && (isdigit(*pos) || *pos == 'T')) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2008:** +1
```cpp
while (pos < end && (isdigit(*pos) || *pos == 'T')) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2008:** +1
```cpp
while (pos < end && (isdigit(*pos) || *pos == 'T')) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2018:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (pos == end || *pos == '.' ||
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2018:** +1
```cpp
if (pos == end || *pos == '.' ||
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2020:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (digits == 4 || digits == 8 || digits >= 14) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2020:** +1
```cpp
if (digits == 4 || digits == 8 || digits >= 14) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2022:** +1, nesting level increased to 2
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2031:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
while (ptr < end && isdigit(*ptr) && field_idx < MAX_DATE_PARTS) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2031:** +1
```cpp
while (ptr < end && isdigit(*ptr) && field_idx < MAX_DATE_PARTS) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2034:** +1
```cpp
bool scan_to_delim = (!is_interval_format) && (field_idx != 6);
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2035:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
while (ptr < end && isdigit(*ptr) && (scan_to_delim || field_len--)) { // field_len <= 7
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2035:** +1
```cpp
while (ptr < end && isdigit(*ptr) && (scan_to_delim || field_len--)) { // field_len <= 7
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2035:** +1
```cpp
while (ptr < end && isdigit(*ptr) && (scan_to_delim || field_len--)) { // field_len <= 7
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2039:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (field_idx == 6) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2040:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if constexpr (is_datetime) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2045:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (scale >= 0) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2056:** +5, including nesting penalty of 4, nesting level increased to 5
```cpp
if (reminder >= 5 * normalizer) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2061:** +5, including nesting penalty of 4, nesting level increased to 5
```cpp
if (temp_val == int_exp10(7)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2064:** +1, nesting level increased to 5
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2068:** +1, nesting level increased to 3
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2076:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (temp_val > 999999L) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2081:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (field_idx == 6) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2085:** +1, nesting level increased to 2
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2091:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (ptr == end) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2097:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (UNLIKELY((field_idx > 2 ||
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2099:** +1
```cpp
&& time_zone_begins(ptr, end))) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2097:** +1
```cpp
if (UNLIKELY((field_idx > 2 ||
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2100:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (local_time_zone == nullptr) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2103:** nesting level increased to 3
```cpp
auto get_tz_offset = [&](const std::string& str_tz,
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2106:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (!TimezoneUtils::find_cctz_time_zone(str_tz, given_tz)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2117:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
} catch ([[maybe_unused]] Exception& e) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2124:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (field_idx == 2 && *ptr == 'T') {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2124:** +1
```cpp
if (field_idx == 2 && *ptr == 'T') {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2132:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (field_idx == 5) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2133:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (*ptr == '.') {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2136:** +1, nesting level increased to 3
```cpp
} else if (isdigit(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2144:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
while (ptr < end && (ispunct(*ptr) || isspace(*ptr))) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2144:** +1
```cpp
while (ptr < end && (ispunct(*ptr) || isspace(*ptr))) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2144:** +1
```cpp
while (ptr < end && (ispunct(*ptr) || isspace(*ptr))) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2145:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (isspace(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2146:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (((1 << field_idx) & allow_space_mask) == 0) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2150:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (*ptr == '-') {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2158:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (!is_interval_format) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2161:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
for (; field_idx < MAX_DATE_PARTS; ++field_idx) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2165:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (year_len == 2) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2166:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (date_val[0] < YY_PART_YEAR) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2168:** +1, nesting level increased to 2
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2173:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (num_field < 3) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2176:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (is_invalid(date_val[0], date_val[1], date_val[2], 0, 0, 0, 0)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2180:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (!check_range_and_set_time(date_val[0], date_val[1], date_val[2], date_val[3], date_val[4],
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2185:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
return sec_offset ? date_add_interval<TimeUnit::SECOND>(
^
```
</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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-2002231434
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991486530
<details>
<summary>TPC-DS: <b>Total hot run time: 187615 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 acd73f943633a1c359df3d98eaf60e9049e9bf13, data reload: false
query1 934 367 342 342
query2 7370 1983 1928 1928
query3 6707 224 216 216
query4 31233 20696 20720 20696
query5 4313 493 424 424
query6 285 182 167 167
query7 4619 295 293 293
query8 230 181 181 181
query9 9869 2269 2251 2251
query10 450 234 247 234
query11 14943 14241 14177 14177
query12 129 90 86 86
query13 1627 416 418 416
query14 11652 10877 11697 10877
query15 267 221 203 203
query16 8070 263 264 263
query17 1936 574 535 535
query18 2063 292 286 286
query19 333 183 156 156
query20 97 88 88 88
query21 212 128 129 128
query22 4701 4501 4438 4438
query23 31830 31351 31124 31124
query24 11635 2868 2790 2790
query25 658 408 374 374
query26 1875 163 161 161
query27 3030 343 345 343
query28 8129 1846 1858 1846
query29 1056 651 618 618
query30 315 145 147 145
query31 955 711 717 711
query32 104 59 55 55
query33 760 258 262 258
query34 1040 461 463 461
query35 842 615 606 606
query36 1002 901 901 901
query37 272 77 84 77
query38 3232 3201 3134 3134
query39 1415 1371 1385 1371
query40 293 112 112 112
query41 50 48 47 47
query42 102 98 100 98
query43 464 446 450 446
query44 1286 712 723 712
query45 263 255 250 250
query46 1083 701 696 696
query47 1656 1602 1591 1591
query48 446 357 353 353
query49 1243 345 332 332
query50 764 367 378 367
query51 6766 6568 6769 6568
query52 109 87 95 87
query53 338 274 293 274
query54 323 244 244 244
query55 88 81 79 79
query56 270 233 233 233
query57 1091 1010 1017 1010
query58 228 204 212 204
query59 2688 2617 2756 2617
query60 274 266 262 262
query61 123 117 131 117
query62 620 397 403 397
query63 303 274 278 274
query64 6439 3910 3918 3910
query65 3114 3070 3027 3027
query66 1363 328 320 320
query67 15124 14465 14392 14392
query68 7558 522 521 521
query69 620 382 401 382
query70 1303 1172 1110 1110
query71 517 275 265 265
query72 6371 2672 2534 2534
query73 725 324 312 312
query74 8008 6637 6476 6476
query75 9812 8287 8115 8115
query76 4896 848 966 848
query77 649 263 256 256
query78 10216 9643 9660 9643
query79 12398 522 515 515
query80 2323 365 406 365
query81 495 209 211 209
query82 331 204 202 202
query83 231 146 148 146
query84 282 81 75 75
query85 1229 332 323 323
query86 378 310 294 294
query87 3550 3231 3217 3217
query88 5255 2250 2257 2250
query89 490 382 381 381
query90 2057 174 177 174
query91 164 127 129 127
query92 63 51 49 49
query93 6768 504 474 474
query94 1342 181 178 178
query95 427 325 324 324
query96 597 268 274 268
query97 4387 4254 4284 4254
query98 230 211 207 207
query99 1096 742 745 742
Total cold run time: 321869 ms
Total hot run time: 187615 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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991599338
TeamCity be ut coverage result:
Function Coverage: 34.97% (8558/24471)
Line Coverage: 26.82% (69580/259411)
Region Coverage: 26.06% (36095/138488)
Branch Coverage: 23.04% (18458/80106)
Coverage Report: http://coverage.selectdb-in.cc/coverage/f6227593d9dc01d7d98859510ce74bab8d214c36_f6227593d9dc01d7d98859510ce74bab8d214c36/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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1993300639
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991577155
<details>
<summary>TPC-H: <b>Total hot run time: 36717 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 f6227593d9dc01d7d98859510ce74bab8d214c36, data reload: false
------ Round 1 ----------------------------------
q1 18147 4291 4196 4196
q2 2352 167 146 146
q3 11817 952 932 932
q4 4965 670 682 670
q5 7620 2760 2733 2733
q6 182 121 137 121
q7 1181 832 796 796
q8 9486 2096 2033 2033
q9 7361 6489 6450 6450
q10 8162 2485 2465 2465
q11 424 232 220 220
q12 767 312 295 295
q13 17957 3031 3015 3015
q14 281 248 254 248
q15 503 452 451 451
q16 496 394 387 387
q17 944 518 539 518
q18 6445 5897 5803 5803
q19 1589 1410 1451 1410
q20 546 286 290 286
q21 7354 3239 3292 3239
q22 799 307 303 303
Total cold run time: 109378 ms
Total hot run time: 36717 ms
----- Round 2, with runtime_filter_mode=off -----
q1 4102 4126 4081 4081
q2 323 245 224 224
q3 2943 2817 2856 2817
q4 1875 1572 1600 1572
q5 5247 5261 5260 5260
q6 196 117 119 117
q7 2236 1803 1795 1795
q8 3154 3283 3310 3283
q9 8544 8536 8485 8485
q10 6236 3721 3654 3654
q11 525 441 447 441
q12 704 550 555 550
q13 10211 2828 2845 2828
q14 274 241 257 241
q15 479 453 440 440
q16 448 410 404 404
q17 1741 1480 1467 1467
q18 7665 7200 7104 7104
q19 4220 1561 1544 1544
q20 1920 1689 1716 1689
q21 4806 4808 4611 4611
q22 515 473 432 432
Total cold run time: 68364 ms
Total hot run time: 53039 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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "zhiqiang-hhhh (via GitHub)" <gi...@apache.org>.
zhiqiang-hhhh commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991424446
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "zhiqiang-hhhh (via GitHub)" <gi...@apache.org>.
zhiqiang-hhhh commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1988568346
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991465917
<details>
<summary>TPC-H: <b>Total hot run time: 36851 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 acd73f943633a1c359df3d98eaf60e9049e9bf13, data reload: false
------ Round 1 ----------------------------------
q1 17688 4405 4244 4244
q2 2482 160 149 149
q3 11168 1041 948 948
q4 4972 693 730 693
q5 7936 2929 2837 2837
q6 185 126 130 126
q7 1196 837 816 816
q8 9496 2105 2023 2023
q9 7346 6475 6413 6413
q10 8126 2479 2481 2479
q11 419 224 218 218
q12 773 287 296 287
q13 17954 2974 2984 2974
q14 278 246 249 246
q15 494 466 451 451
q16 478 390 410 390
q17 933 535 558 535
q18 6634 5970 5833 5833
q19 1577 1396 1467 1396
q20 546 285 278 278
q21 7425 3274 3217 3217
q22 786 298 300 298
Total cold run time: 108892 ms
Total hot run time: 36851 ms
----- Round 2, with runtime_filter_mode=off -----
q1 4164 4090 4162 4090
q2 321 234 233 233
q3 3033 2859 2827 2827
q4 1812 1539 1539 1539
q5 5261 5290 5258 5258
q6 196 117 120 117
q7 2269 1830 1842 1830
q8 3158 3289 3301 3289
q9 8630 8590 8531 8531
q10 6277 3711 3699 3699
q11 536 433 438 433
q12 737 551 542 542
q13 5672 2926 2880 2880
q14 272 268 265 265
q15 492 445 452 445
q16 462 400 403 400
q17 1719 1474 1479 1474
q18 7622 7247 7074 7074
q19 6496 1515 1583 1515
q20 1894 1723 1689 1689
q21 4790 4793 4716 4716
q22 536 436 453 436
Total cold run time: 66349 ms
Total hot run time: 53282 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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991599775
<details>
<summary>TPC-DS: <b>Total hot run time: 186605 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 f6227593d9dc01d7d98859510ce74bab8d214c36, data reload: false
query1 913 362 342 342
query2 7327 2002 1931 1931
query3 6704 216 210 210
query4 31309 20567 20610 20567
query5 4273 400 415 400
query6 262 175 185 175
query7 4630 305 306 305
query8 232 171 178 171
query9 9987 2319 2294 2294
query10 461 243 262 243
query11 17083 14252 14026 14026
query12 138 86 81 81
query13 1671 419 445 419
query14 12022 10979 10441 10441
query15 282 219 205 205
query16 8045 269 266 266
query17 1908 579 538 538
query18 2061 284 294 284
query19 262 169 159 159
query20 92 85 86 85
query21 217 130 129 129
query22 4667 4439 4524 4439
query23 31743 31016 31131 31016
query24 10820 2812 2807 2807
query25 639 378 396 378
query26 1416 152 162 152
query27 3085 369 359 359
query28 8107 1924 1903 1903
query29 902 631 634 631
query30 311 164 152 152
query31 960 719 750 719
query32 91 61 57 57
query33 782 255 254 254
query34 1099 476 472 472
query35 856 603 608 603
query36 987 861 863 861
query37 126 83 77 77
query38 3253 3101 3122 3101
query39 1465 1348 1371 1348
query40 210 111 117 111
query41 50 47 51 47
query42 100 102 98 98
query43 464 450 424 424
query44 1242 726 718 718
query45 273 266 263 263
query46 1065 682 681 681
query47 1680 1580 1584 1580
query48 442 394 354 354
query49 1143 345 338 338
query50 758 381 389 381
query51 6707 6549 6511 6511
query52 102 96 96 96
query53 338 266 280 266
query54 297 242 246 242
query55 83 78 80 78
query56 269 232 236 232
query57 1086 1005 1010 1005
query58 231 207 212 207
query59 2735 2534 2537 2534
query60 265 250 254 250
query61 120 114 117 114
query62 591 420 412 412
query63 303 281 281 281
query64 5687 3715 3854 3715
query65 3101 3004 2999 2999
query66 1443 330 319 319
query67 14900 14448 14432 14432
query68 8885 535 528 528
query69 630 376 384 376
query70 1188 1093 1151 1093
query71 549 282 287 282
query72 6375 2665 2512 2512
query73 730 323 317 317
query74 7042 6582 6561 6561
query75 9640 8009 8035 8009
query76 5298 909 997 909
query77 641 270 259 259
query78 10475 9550 9691 9550
query79 11518 514 523 514
query80 2573 381 392 381
query81 510 205 211 205
query82 353 206 195 195
query83 247 140 160 140
query84 292 81 76 76
query85 1246 349 321 321
query86 362 308 311 308
query87 3443 3215 3227 3215
query88 5523 2347 2369 2347
query89 483 362 361 361
query90 2106 176 180 176
query91 158 128 131 128
query92 64 48 47 47
query93 6930 504 490 490
query94 1378 178 181 178
query95 433 326 330 326
query96 612 283 285 283
query97 4401 4284 4298 4284
query98 249 210 213 210
query99 1032 736 744 736
Total cold run time: 322239 ms
Total hot run time: 186605 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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #32075:
URL: https://github.com/apache/doris/pull/32075#discussion_r1521098106
##########
be/test/vec/data_types/from_string_test.cpp:
##########
@@ -16,6 +16,7 @@
// under the License.
#include "gtest/gtest_pred_impl.h"
Review Comment:
warning: 'gtest/gtest_pred_impl.h' file not found [clang-diagnostic-error]
```cpp
#include "gtest/gtest_pred_impl.h"
^
```
--
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991615699
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
```
Load test result on commit f6227593d9dc01d7d98859510ce74bab8d214c36 with default session variables
Stream load json: 19 seconds loaded 2358488459 Bytes, about 118 MB/s
Stream load orc: 59 seconds loaded 1101869774 Bytes, about 17 MB/s
Stream load parquet: 31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select: 17.6 seconds inserted 10000000 Rows, about 568K ops/s
```
--
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "zhiqiang-hhhh (via GitHub)" <gi...@apache.org>.
zhiqiang-hhhh commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991076326
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "zhiqiang-hhhh (via GitHub)" <gi...@apache.org>.
zhiqiang-hhhh commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991540535
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "zhiqiang-hhhh (via GitHub)" <gi...@apache.org>.
zhiqiang-hhhh commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991543297
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991466872
TeamCity be ut coverage result:
Function Coverage: 34.97% (8558/24471)
Line Coverage: 26.82% (69579/259419)
Region Coverage: 26.07% (36103/138498)
Branch Coverage: 23.04% (18457/80108)
Coverage Report: http://coverage.selectdb-in.cc/coverage/acd73f943633a1c359df3d98eaf60e9049e9bf13_acd73f943633a1c359df3d98eaf60e9049e9bf13/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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #32075:
URL: https://github.com/apache/doris/pull/32075
--
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991495756
<details>
<summary>ClickBench: <b>Total hot run time: 30.99 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 acd73f943633a1c359df3d98eaf60e9049e9bf13, data reload: false
query1 0.04 0.04 0.04
query2 0.06 0.02 0.02
query3 0.22 0.06 0.06
query4 1.68 0.10 0.10
query5 0.52 0.50 0.51
query6 1.18 0.63 0.63
query7 0.02 0.01 0.01
query8 0.03 0.03 0.03
query9 0.57 0.49 0.49
query10 0.55 0.55 0.54
query11 0.11 0.09 0.09
query12 0.12 0.09 0.09
query13 0.57 0.55 0.56
query14 0.73 0.76 0.74
query15 0.78 0.78 0.77
query16 0.40 0.38 0.40
query17 0.95 1.00 0.94
query18 0.19 0.25 0.23
query19 1.83 1.70 1.72
query20 0.01 0.00 0.01
query21 15.78 0.56 0.56
query22 2.59 1.68 1.99
query23 17.30 0.81 0.65
query24 3.12 2.37 2.00
query25 0.24 0.10 0.27
query26 0.61 0.12 0.11
query27 0.04 0.02 0.02
query28 9.85 0.85 0.84
query29 12.53 3.17 3.12
query30 0.65 0.55 0.57
query31 2.81 0.35 0.33
query32 3.39 0.44 0.45
query33 2.81 2.81 2.83
query34 16.02 4.30 4.35
query35 4.29 4.28 4.38
query36 1.05 0.99 1.00
query37 0.07 0.05 0.06
query38 0.04 0.04 0.03
query39 0.02 0.02 0.02
query40 0.18 0.14 0.14
query41 0.08 0.02 0.02
query42 0.03 0.02 0.02
query43 0.04 0.02 0.03
Total cold run time: 104.1 s
Total hot run time: 30.99 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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991501296
Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
```
Load test result on commit acd73f943633a1c359df3d98eaf60e9049e9bf13 with default session variables
Stream load json: 18 seconds loaded 2358488459 Bytes, about 124 MB/s
Stream load orc: 59 seconds loaded 1101869774 Bytes, about 17 MB/s
Stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
Insert into select: 16.6 seconds inserted 10000000 Rows, about 602K ops/s
```
--
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #32075:
URL: https://github.com/apache/doris/pull/32075#discussion_r1519822265
##########
be/src/vec/runtime/vdatetime_value.cpp:
##########
@@ -1988,13 +1989,13 @@ bool DateV2Value<T>::from_date_str(const char* date_str, int len,
template <typename T>
bool DateV2Value<T>::from_date_str_base(const char* date_str, int len, int scale,
Review Comment:
warning: function 'from_date_str_base' has cognitive complexity of 115 (threshold 50) [readability-function-cognitive-complexity]
```cpp
bool DateV2Value<T>::from_date_str_base(const char* date_str, int len, int scale,
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/runtime/vdatetime_value.cpp:2000:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
while (ptr < end && isspace(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2000:** +1
```cpp
while (ptr < end && isspace(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2003:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (ptr == end || !isdigit(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2003:** +1
```cpp
if (ptr == end || !isdigit(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2008:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
while (pos < end && (isdigit(*pos) || *pos == 'T')) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2008:** +1
```cpp
while (pos < end && (isdigit(*pos) || *pos == 'T')) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2008:** +1
```cpp
while (pos < end && (isdigit(*pos) || *pos == 'T')) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2018:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
if (pos == end || *pos == '.' ||
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2018:** +1
```cpp
if (pos == end || *pos == '.' ||
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2020:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (digits == 4 || digits == 8 || digits >= 14) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2020:** +1
```cpp
if (digits == 4 || digits == 8 || digits >= 14) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2022:** +1, nesting level increased to 2
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2031:** +1, including nesting penalty of 0, nesting level increased to 1
```cpp
while (ptr < end && isdigit(*ptr) && field_idx < MAX_DATE_PARTS) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2031:** +1
```cpp
while (ptr < end && isdigit(*ptr) && field_idx < MAX_DATE_PARTS) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2034:** +1
```cpp
bool scan_to_delim = (!is_interval_format) && (field_idx != 6);
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2035:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
while (ptr < end && isdigit(*ptr) && (scan_to_delim || field_len--)) { // field_len <= 7
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2035:** +1
```cpp
while (ptr < end && isdigit(*ptr) && (scan_to_delim || field_len--)) { // field_len <= 7
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2035:** +1
```cpp
while (ptr < end && isdigit(*ptr) && (scan_to_delim || field_len--)) { // field_len <= 7
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2039:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if constexpr (is_datetime) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2044:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (field_idx == 6 && scale >= 0) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2044:** +1
```cpp
if (field_idx == 6 && scale >= 0) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2055:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (reminder >= 5 * normalizer) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2060:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (temp_val == int_exp10(7)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2063:** +1, nesting level increased to 4
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2067:** +1, nesting level increased to 2
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2068:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (field_idx == 6) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2075:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (temp_val > 999999L) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2080:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (field_idx == 6) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2084:** +1, nesting level increased to 3
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2090:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (ptr == end) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2096:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (UNLIKELY((field_idx > 2 ||
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2098:** +1
```cpp
&& time_zone_begins(ptr, end))) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2096:** +1
```cpp
if (UNLIKELY((field_idx > 2 ||
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2099:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (local_time_zone == nullptr) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2102:** nesting level increased to 4
```cpp
auto get_tz_offset = [&](const std::string& str_tz,
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2105:** +5, including nesting penalty of 4, nesting level increased to 5
```cpp
if (!TimezoneUtils::find_cctz_time_zone(str_tz, given_tz)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2116:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
} catch ([[maybe_unused]] Exception& e) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2123:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (field_idx == 2 && *ptr == 'T') {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2123:** +1
```cpp
if (field_idx == 2 && *ptr == 'T') {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2131:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (field_idx == 5) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2132:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (*ptr == '.') {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2135:** +1, nesting level increased to 4
```cpp
} else if (isdigit(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2143:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
while (ptr < end && (ispunct(*ptr) || isspace(*ptr))) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2143:** +1
```cpp
while (ptr < end && (ispunct(*ptr) || isspace(*ptr))) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2143:** +1
```cpp
while (ptr < end && (ispunct(*ptr) || isspace(*ptr))) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2144:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (isspace(*ptr)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2145:** +5, including nesting penalty of 4, nesting level increased to 5
```cpp
if (((1 << field_idx) & allow_space_mask) == 0) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2149:** +4, including nesting penalty of 3, nesting level increased to 4
```cpp
if (*ptr == '-') {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2157:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (!is_interval_format) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2160:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
for (; field_idx < MAX_DATE_PARTS; ++field_idx) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2164:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (year_len == 2) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2165:** +3, including nesting penalty of 2, nesting level increased to 3
```cpp
if (date_val[0] < YY_PART_YEAR) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2167:** +1, nesting level increased to 3
```cpp
} else {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2172:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (num_field < 3) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2175:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (is_invalid(date_val[0], date_val[1], date_val[2], 0, 0, 0, 0)) {
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2179:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
if (!check_range_and_set_time(date_val[0], date_val[1], date_val[2], date_val[3], date_val[4],
^
```
**be/src/vec/runtime/vdatetime_value.cpp:2184:** +2, including nesting penalty of 1, nesting level increased to 2
```cpp
return sec_offset ? date_add_interval<TimeUnit::SECOND>(
^
```
</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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1988550968
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)
--
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] [fix](datetime) fix datetime rounding on BE [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #32075:
URL: https://github.com/apache/doris/pull/32075#issuecomment-1991609664
<details>
<summary>ClickBench: <b>Total hot run time: 29.94 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 f6227593d9dc01d7d98859510ce74bab8d214c36, data reload: false
query1 0.04 0.04 0.03
query2 0.07 0.02 0.03
query3 0.23 0.07 0.06
query4 1.67 0.10 0.10
query5 0.50 0.49 0.51
query6 1.18 0.63 0.62
query7 0.02 0.01 0.02
query8 0.04 0.03 0.03
query9 0.55 0.49 0.50
query10 0.56 0.53 0.53
query11 0.12 0.09 0.08
query12 0.11 0.10 0.09
query13 0.57 0.57 0.56
query14 0.72 0.74 0.76
query15 0.79 0.78 0.77
query16 0.39 0.39 0.39
query17 1.03 0.95 1.01
query18 0.19 0.28 0.22
query19 1.74 1.72 1.69
query20 0.02 0.01 0.01
query21 15.43 0.57 0.58
query22 2.26 2.06 1.39
query23 17.32 0.83 0.85
query24 3.22 1.98 1.01
query25 0.20 0.18 0.10
query26 0.70 0.13 0.13
query27 0.04 0.02 0.03
query28 10.29 0.86 0.90
query29 12.60 3.15 3.20
query30 0.69 0.56 0.57
query31 2.80 0.34 0.34
query32 3.37 0.43 0.44
query33 2.78 2.75 2.79
query34 16.15 4.35 4.37
query35 4.40 4.35 4.31
query36 1.09 1.00 0.99
query37 0.06 0.05 0.06
query38 0.05 0.03 0.03
query39 0.02 0.02 0.01
query40 0.17 0.13 0.13
query41 0.08 0.02 0.02
query42 0.03 0.02 0.01
query43 0.03 0.03 0.02
Total cold run time: 104.32 s
Total hot run time: 29.94 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