You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Mryange (via GitHub)" <gi...@apache.org> on 2026/04/01 08:09:50 UTC
[PR] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Mryange opened a new pull request, #61996:
URL: https://github.com/apache/doris/pull/61996
### What problem does this PR solve?
Problem Summary:
`DataTypeNumberSerDe<T>` was a monolithic template class serving as both the base class for all number-like SerDe types and the concrete implementation for pure numeric types. It handled 17+ types via extensive `if constexpr` branches, making the code hard to read and maintain. The inheritance structure was also asymmetric with the DataType side.
This PR performs a multi-phase refactoring:
**Phase 1 — Split base class and add thin final wrapper**
- Rename `DataTypeNumberSerDe<T>` → `DataTypeNumberSerDeBase<T>` (base class)
- Add `DataTypeNumberSerDe<T> final` for pure numeric types (Bool/Int/Float/Double/Time), mirroring `DataTypeNumber<T>` on the DataType side
**Phase 3 — Lift `get_scale()` to `DataTypeSerDe` base**
- Move `get_scale()` from `DataTypeNumberSerDeBase<T>` to `DataTypeSerDe`, making it available to all SerDe types (e.g. Decimal)
**Phase 4 — Split Date/DateTime v1 SerDe into separate files**
- Create `DataTypeDateLikeV1SerDe<T>` shared template for Date/DateTime v1 common logic
- Split into `data_type_date_serde.h/.cpp` and `data_type_datetime_serde.h/.cpp`
- `DataTypeDateSerDe` and `DataTypeDateTimeSerDe` are now siblings (not parent-child)
**Phase 2 — Sink `if constexpr` branches to subclasses**
- Move type-specific PB/Jsonb serialization logic from `DataTypeNumberSerDeBase<T>` into subclass overrides:
- `DataTypeDateLikeV1SerDe<T>`: write/read PB (INT64), write/read Jsonb
- `DataTypeDateV2SerDe`: write/read PB (UINT32), write/read Jsonb
- `DataTypeDateTimeV2SerDe`: write/read PB (UINT64), write/read Jsonb
- `DataTypeTimeStampTzSerDe`: write/read PB (UINT64), write/read Jsonb, read_column_from_arrow
- `DataTypeIPv4SerDe`: write/read Jsonb
- Remove corresponding dead branches from the base class
After refactoring, the base class `DataTypeNumberSerDeBase<T>` PB methods only handle pure numeric types (Bool, TinyInt–BigInt, LargeInt, Float, Double, Time/TimeV2).
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
--
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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4175922901
/review
--
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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4170445642
# BE UT Coverage Report
Increment line coverage ` ` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/aba9f743a996ccde838c2e66f891339fcd943b52_aba9f743a996ccde838c2e66f891339fcd943b52/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/aba9f743a996ccde838c2e66f891339fcd943b52_aba9f743a996ccde838c2e66f891339fcd943b52/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 52.91% (20049/37890) |
| Line Coverage | 36.50% (188114/515407) |
| Region Coverage | 32.69% (145677/445676) |
| Branch Coverage | 33.89% (63878/188486) |
--
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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4170617611
# BE Regression && UT Coverage Report
Increment line coverage `100% (0/0)` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/61996_aba9f743a996ccde838c2e66f891339fcd943b52_merge/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/61996_aba9f743a996ccde838c2e66f891339fcd943b52_merge/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 73.63% (27322/37109) |
| Line Coverage | 57.26% (294259/513858) |
| Region Coverage | 54.68% (245930/449789) |
| Branch Coverage | 56.24% (106329/189052) |
--
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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4169529789
<details>
<summary>TPC-DS: <b>Total hot run time: 179825 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 16ba36d3bc84e144c319149ee3f865a37d39fb4b, data reload: false
query5 4343 663 530 530
query6 347 228 215 215
query7 4232 550 321 321
query8 337 256 224 224
query9 8754 3920 3934 3920
query10 536 389 371 371
query11 6660 5472 5145 5145
query12 182 132 123 123
query13 1276 606 439 439
query14 5676 5146 4721 4721
query14_1 4109 4058 4076 4058
query15 207 201 179 179
query16 995 440 418 418
query17 949 753 628 628
query18 2433 488 372 372
query19 243 225 184 184
query20 137 137 139 137
query21 232 148 125 125
query22 14104 14948 14428 14428
query23 18124 17036 16649 16649
query23_1 16881 16643 16878 16643
query24 7463 1743 1369 1369
query24_1 1351 1346 1336 1336
query25 613 526 469 469
query26 1279 315 193 193
query27 2691 631 371 371
query28 4562 1916 1898 1898
query29 972 685 559 559
query30 302 244 199 199
query31 1102 1056 962 962
query32 88 74 73 73
query33 557 368 311 311
query34 1207 1172 671 671
query35 745 774 679 679
query36 1218 1217 1141 1141
query37 158 99 90 90
query38 3117 3024 2997 2997
query39 922 890 866 866
query39_1 842 841 826 826
query40 236 163 147 147
query41 67 65 64 64
query42 275 280 272 272
query43 316 372 275 275
query44
query45 204 199 185 185
query46 1151 1212 787 787
query47 2325 2323 2199 2199
query48 393 428 313 313
query49 647 534 436 436
query50 724 292 221 221
query51 4278 4328 4239 4239
query52 280 281 272 272
query53 321 343 273 273
query54 323 303 282 282
query55 103 93 88 88
query56 334 331 317 317
query57 1782 1690 1664 1664
query58 301 276 277 276
query59 2890 2983 2715 2715
query60 327 330 315 315
query61 162 160 157 157
query62 702 621 559 559
query63 315 275 268 268
query64 5222 1490 1065 1065
query65
query66 1475 470 370 370
query67 24290 24383 24185 24185
query68
query69 438 343 300 300
query70 1022 985 1018 985
query71 376 335 315 315
query72 3021 2730 2434 2434
query73 783 807 430 430
query74 9910 9737 9542 9542
query75 3564 3368 2995 2995
query76 2391 1160 785 785
query77 406 441 340 340
query78 11465 11382 10754 10754
query79 1543 1117 856 856
query80 842 770 681 681
query81 453 278 236 236
query82 1347 158 124 124
query83 372 284 255 255
query84 310 140 120 120
query85 863 515 456 456
query86 381 342 313 313
query87 3304 3190 3065 3065
query88 3597 2738 2685 2685
query89 480 410 375 375
query90 1980 178 180 178
query91 179 171 133 133
query92 78 75 69 69
query93 912 887 507 507
query94 530 331 294 294
query95 663 473 334 334
query96 1073 724 336 336
query97 2711 2663 2564 2564
query98 255 235 231 231
query99 1056 1057 942 942
Total cold run time: 259292 ms
Total hot run time: 179825 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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4169481711
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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4168318371
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).
Please clearly describe your PR:
1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
3. What features were added. Why was this function added?
4. Which code was refactored and why was this part of the code refactored?
5. Which functions were optimized and what is the difference before and after the optimization?
--
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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange closed pull request #61996: [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches
URL: https://github.com/apache/doris/pull/61996
--
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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4177172542
# BE UT Coverage Report
Increment line coverage ` ` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/03c3b5becfe027a05e28c18511fffc7b6a22f87e_03c3b5becfe027a05e28c18511fffc7b6a22f87e/increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/03c3b5becfe027a05e28c18511fffc7b6a22f87e_03c3b5becfe027a05e28c18511fffc7b6a22f87e/report/index.html)
| Category | Coverage |
|-------------------|--------------------|
| Function Coverage | 52.99% (20084/37905) |
| Line Coverage | 36.58% (188631/515674) |
| Region Coverage | 32.84% (146442/445920) |
| Branch Coverage | 33.99% (64116/188632) |
--
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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #61996:
URL: https://github.com/apache/doris/pull/61996#discussion_r3026622018
##########
be/src/core/data_type_serde/data_type_datev2_serde.cpp:
##########
@@ -515,4 +517,43 @@ template Status DataTypeDateV2SerDe::from_decimal_strict_mode_batch<DataTypeDeci
template Status DataTypeDateV2SerDe::from_decimal_strict_mode_batch<DataTypeDecimal256>(
const DataTypeDecimal256::ColumnType& decimal_col, IColumn& target_col) const;
+Status DataTypeDateV2SerDe::write_column_to_pb(const IColumn& column, PValues& result,
+ int64_t start, int64_t end) const {
+ auto row_count = cast_set<int>(end - start);
+ auto* ptype = result.mutable_type();
+ const auto* col = check_and_get_column<ColumnType>(column);
+ auto& data = col->get_data();
+ ptype->set_id(PGenericType::UINT32);
+ auto* values = result.mutable_uint32_value();
+ values->Reserve(row_count);
+ values->Add((uint32_t*)data.begin() + start, (uint32_t*)data.begin() + end);
Review Comment:
write_column_to_pb() is adding values by casting the column’s DateV2Value buffer to `uint32_t*` and passing it to protobuf. Even though DateV2Value stores an underlying integer, reinterpreting the object array as a `uint32_t` array relies on object layout and can violate strict-aliasing rules (undefined behavior under optimization). Prefer filling the repeated field by iterating and pushing `to_date_int_val()` (or an equivalent accessor) per element, or using a safe bit-cast/memcpy-based conversion instead of pointer reinterprets.
```suggestion
for (int64_t i = start; i < end; ++i) {
values->Add(data[i].to_date_int_val());
}
```
##########
be/src/core/data_type_serde/data_type_datetimev2_serde.cpp:
##########
@@ -597,4 +599,47 @@ template Status DataTypeDateTimeV2SerDe::from_decimal_strict_mode_batch<DataType
const DataTypeDecimal128::ColumnType& decimal_col, IColumn& target_col) const;
template Status DataTypeDateTimeV2SerDe::from_decimal_strict_mode_batch<DataTypeDecimal256>(
const DataTypeDecimal256::ColumnType& decimal_col, IColumn& target_col) const;
+
+Status DataTypeDateTimeV2SerDe::write_column_to_pb(const IColumn& column, PValues& result,
+ int64_t start, int64_t end) const {
+ auto row_count = cast_set<int>(end - start);
+ auto* ptype = result.mutable_type();
+ const auto* col = check_and_get_column<ColumnType>(column);
+ auto& data = col->get_data();
+ ptype->set_id(PGenericType::UINT64);
+ auto* values = result.mutable_uint64_value();
+ values->Reserve(row_count);
+ values->Add((uint64_t*)data.begin() + start, (uint64_t*)data.begin() + end);
Review Comment:
write_column_to_pb() casts the `DateV2Value<DateTimeV2ValueType>` data buffer to `uint64_t*` and passes it to protobuf. This relies on the in-memory layout of DateV2Value matching a raw `uint64_t` array and can violate strict-aliasing rules (undefined behavior). Safer approach: append values by iterating and using `to_date_int_val()` (or a safe bit-cast/memcpy) to obtain the underlying `uint64_t` representation.
```suggestion
for (int64_t i = start; i < end; ++i) {
values->Add(data[i].to_date_int_val());
}
```
##########
be/src/core/data_type_serde/data_type_timestamptz_serde.cpp:
##########
@@ -250,4 +253,97 @@ std::string DataTypeTimeStampTzSerDe::to_olap_string(const Field& field) const {
return CastToString::from_timestamptz(field.get<TYPE_TIMESTAMPTZ>(), 6);
}
+Status DataTypeTimeStampTzSerDe::write_column_to_pb(const IColumn& column, PValues& result,
+ int64_t start, int64_t end) const {
+ auto row_count = cast_set<int>(end - start);
+ auto* ptype = result.mutable_type();
+ const auto* col = check_and_get_column<ColumnType>(column);
+ auto& data = col->get_data();
+ ptype->set_id(PGenericType::UINT64);
+ auto* values = result.mutable_uint64_value();
+ values->Reserve(row_count);
+ values->Add((uint64_t*)data.begin() + start, (uint64_t*)data.begin() + end);
Review Comment:
write_column_to_pb() populates the protobuf repeated field by reinterpreting the `TimestampTzValue` object buffer as a `uint64_t*`. This assumes object layout compatibility and can trigger strict-aliasing UB under optimization. Consider appending the underlying integer via `TimestampTzValue::to_date_int_val()` (or a safe bit-cast/memcpy) per row instead of pointer casting.
```suggestion
for (int64_t i = start; i < end; ++i) {
values->Add(binary_cast<TimestampTzValue, UInt64>(data[i]));
}
```
--
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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4176754507
<details>
<summary>TPC-DS: <b>Total hot run time: 180538 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 03c3b5becfe027a05e28c18511fffc7b6a22f87e, data reload: false
query5 4495 654 498 498
query6 341 237 210 210
query7 4284 571 337 337
query8 357 254 230 230
query9 8743 3913 3913 3913
query10 494 414 345 345
query11 6658 5498 5151 5151
query12 202 137 129 129
query13 1292 602 446 446
query14 5660 5190 4712 4712
query14_1 4085 4036 4063 4036
query15 210 200 179 179
query16 1032 446 441 441
query17 1134 782 616 616
query18 2433 493 378 378
query19 241 224 181 181
query20 145 134 128 128
query21 223 140 123 123
query22 13915 14879 15249 14879
query23 18211 17135 16625 16625
query23_1 16840 16693 16674 16674
query24 7810 1771 1343 1343
query24_1 1384 1353 1396 1353
query25 623 539 482 482
query26 1255 322 187 187
query27 2685 616 391 391
query28 4510 1894 1874 1874
query29 966 720 627 627
query30 304 231 190 190
query31 1087 1047 934 934
query32 93 70 71 70
query33 536 353 286 286
query34 1215 1127 709 709
query35 745 792 670 670
query36 1301 1253 1170 1170
query37 153 98 83 83
query38 3093 3035 2992 2992
query39 918 899 847 847
query39_1 858 840 843 840
query40 235 154 137 137
query41 67 61 61 61
query42 278 271 275 271
query43 317 316 278 278
query44
query45 203 197 182 182
query46 1177 1300 790 790
query47 2340 2364 2227 2227
query48 401 409 310 310
query49 645 528 440 440
query50 711 291 220 220
query51 4354 4253 4252 4252
query52 285 286 267 267
query53 332 348 268 268
query54 321 290 277 277
query55 101 93 89 89
query56 325 336 318 318
query57 1737 1731 1649 1649
query58 300 271 270 270
query59 2926 2990 2716 2716
query60 330 342 327 327
query61 150 146 155 146
query62 688 629 583 583
query63 320 279 268 268
query64 5257 1441 1097 1097
query65
query66 1499 473 375 375
query67 24409 24317 24212 24212
query68
query69 459 337 291 291
query70 989 1014 968 968
query71 363 334 312 312
query72 3016 2750 2465 2465
query73 783 782 467 467
query74 9839 9707 9616 9616
query75 3558 3383 3020 3020
query76 2331 1128 766 766
query77 387 421 334 334
query78 11216 11381 10750 10750
query79 1540 1156 848 848
query80 950 798 740 740
query81 475 282 246 246
query82 1332 160 131 131
query83 355 303 270 270
query84 268 159 125 125
query85 1002 550 447 447
query86 419 340 325 325
query87 3284 3193 3103 3103
query88 3561 2661 2683 2661
query89 478 415 386 386
query90 1928 181 181 181
query91 190 200 139 139
query92 74 72 72 72
query93 891 882 512 512
query94 615 350 290 290
query95 672 467 343 343
query96 1029 776 328 328
query97 2701 2677 2552 2552
query98 248 230 222 222
query99 1124 1097 981 981
Total cold run time: 259427 ms
Total hot run time: 180538 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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4175465322
/review
--
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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4176281239
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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4176621370
<details>
<summary>TPC-H: <b>Total hot run time: 29172 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 03c3b5becfe027a05e28c18511fffc7b6a22f87e, data reload: false
------ Round 1 ----------------------------------
orders Doris NULL NULL 0 0 0 NULL 0 NULL NULL 2023-12-26 18:27:23 2023-12-26 18:42:55 NULL utf-8 NULL NULL
============================================
q1 17850 3787 3676 3676
q2 q3 10679 871 605 605
q4 4675 467 360 360
q5 7446 1342 1132 1132
q6 184 164 134 134
q7 919 950 768 768
q8 9309 1459 1336 1336
q9 5607 5330 5258 5258
q10 6304 2049 1783 1783
q11 480 279 284 279
q12 825 694 503 503
q13 18029 2782 2161 2161
q14 281 294 256 256
q15 q16 895 882 794 794
q17 1038 1197 731 731
q18 6430 5731 5506 5506
q19 1320 1243 1116 1116
q20 608 537 406 406
q21 4836 2473 2048 2048
q22 446 392 320 320
Total cold run time: 98161 ms
Total hot run time: 29172 ms
----- Round 2, with runtime_filter_mode=off -----
orders Doris NULL NULL 150000000 42 6422171781 NULL 22778155 NULL NULL 2023-12-26 18:27:23 2023-12-26 18:42:55 NULL utf-8 NULL NULL
============================================
q1 4478 4361 4242 4242
q2 q3 4618 4799 4171 4171
q4 2129 2222 1371 1371
q5 4893 4989 5183 4989
q6 193 166 136 136
q7 2013 1743 1619 1619
q8 3250 3099 3084 3084
q9 8334 8364 8267 8267
q10 4450 4483 4275 4275
q11 583 409 396 396
q12 661 838 527 527
q13 2621 3145 2337 2337
q14 310 326 288 288
q15 q16 766 780 707 707
q17 1315 1266 1193 1193
q18 8024 6962 7016 6962
q19 1138 1141 1130 1130
q20 2388 2249 1945 1945
q21 5908 5317 4768 4768
q22 563 495 444 444
Total cold run time: 58635 ms
Total hot run time: 52851 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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "Mryange (via GitHub)" <gi...@apache.org>.
Mryange commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4168431461
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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4169462119
<details>
<summary>TPC-H: <b>Total hot run time: 29684 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 16ba36d3bc84e144c319149ee3f865a37d39fb4b, data reload: false
------ Round 1 ----------------------------------
orders Doris NULL NULL 0 0 0 NULL 0 NULL NULL 2023-12-26 18:27:23 2023-12-26 18:42:55 NULL utf-8 NULL NULL
============================================
q1 17928 3838 3782 3782
q2 q3 10666 891 616 616
q4 4678 470 363 363
q5 7443 1352 1150 1150
q6 196 178 141 141
q7 912 970 767 767
q8 9331 1401 1370 1370
q9 5610 5308 5293 5293
q10 6251 2044 1789 1789
q11 492 283 284 283
q12 867 688 507 507
q13 18041 2803 2173 2173
q14 282 286 256 256
q15 q16 863 859 781 781
q17 970 1168 853 853
q18 6465 5731 5604 5604
q19 1170 1203 1101 1101
q20 608 552 409 409
q21 4766 2494 2094 2094
q22 458 390 352 352
Total cold run time: 97997 ms
Total hot run time: 29684 ms
----- Round 2, with runtime_filter_mode=off -----
orders Doris NULL NULL 150000000 42 6422171781 NULL 22778155 NULL NULL 2023-12-26 18:27:23 2023-12-26 18:42:55 NULL utf-8 NULL NULL
============================================
q1 4681 4520 4661 4520
q2 q3 4628 4738 4163 4163
q4 2012 2079 1331 1331
q5 4916 4996 5357 4996
q6 210 192 157 157
q7 2258 1816 1602 1602
q8 3374 3125 3186 3125
q9 8255 8142 8379 8142
q10 4483 4505 4231 4231
q11 596 413 376 376
q12 650 705 484 484
q13 2719 3172 2342 2342
q14 298 305 273 273
q15 q16 797 771 674 674
q17 1317 1278 1259 1259
q18 8067 7147 7028 7028
q19 1144 1131 1120 1120
q20 2267 2243 1957 1957
q21 6125 5310 4861 4861
q22 551 500 405 405
Total cold run time: 59348 ms
Total hot run time: 53046 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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4169916840
<details>
<summary>TPC-DS: <b>Total hot run time: 180417 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 aba9f743a996ccde838c2e66f891339fcd943b52, data reload: false
query5 4342 665 505 505
query6 341 230 209 209
query7 4287 586 352 352
query8 334 243 229 229
query9 8743 3835 3861 3835
query10 511 390 353 353
query11 6643 5493 5154 5154
query12 192 137 154 137
query13 1271 597 421 421
query14 5618 5151 4719 4719
query14_1 4089 4061 4118 4061
query15 207 195 178 178
query16 1071 443 426 426
query17 1124 787 638 638
query18 2478 502 360 360
query19 242 230 185 185
query20 139 129 127 127
query21 225 149 121 121
query22 13789 15332 15116 15116
query23 17944 17126 16616 16616
query23_1 16758 16718 16836 16718
query24 7578 1868 1386 1386
query24_1 1565 1538 1412 1412
query25 676 564 468 468
query26 1259 341 188 188
query27 2653 645 385 385
query28 4465 1878 1868 1868
query29 1025 694 579 579
query30 301 234 201 201
query31 1087 1044 944 944
query32 90 74 73 73
query33 559 383 313 313
query34 1244 1175 665 665
query35 765 778 680 680
query36 1278 1209 1055 1055
query37 152 100 86 86
query38 3133 3049 3040 3040
query39 944 911 860 860
query39_1 844 834 846 834
query40 242 166 149 149
query41 72 68 68 68
query42 280 277 273 273
query43 326 325 287 287
query44
query45 217 201 200 200
query46 1229 1300 838 838
query47 2327 2350 2215 2215
query48 415 437 292 292
query49 642 550 424 424
query50 733 291 212 212
query51 4458 4267 4337 4267
query52 282 285 275 275
query53 328 345 272 272
query54 323 292 278 278
query55 102 98 88 88
query56 310 315 317 315
query57 1774 1582 1637 1582
query58 291 274 266 266
query59 2916 2984 2711 2711
query60 330 327 325 325
query61 156 151 161 151
query62 688 621 566 566
query63 316 272 263 263
query64 5348 1529 1096 1096
query65
query66 1489 492 383 383
query67 24253 24407 24210 24210
query68
query69 462 342 312 312
query70 1042 1049 974 974
query71 361 326 313 313
query72 3022 2714 2506 2506
query73 864 794 421 421
query74 9805 9846 9527 9527
query75 3578 3408 3003 3003
query76 2308 1155 760 760
query77 407 421 328 328
query78 11269 11452 10720 10720
query79 1536 1098 813 813
query80 1373 758 677 677
query81 521 283 234 234
query82 1260 159 119 119
query83 334 288 265 265
query84 274 150 120 120
query85 955 530 473 473
query86 465 344 287 287
query87 3294 3187 3118 3118
query88 3673 2691 2671 2671
query89 478 403 375 375
query90 2055 185 175 175
query91 183 187 148 148
query92 75 75 69 69
query93 937 910 505 505
query94 694 349 296 296
query95 674 458 332 332
query96 1057 832 324 324
query97 2700 2659 2547 2547
query98 238 226 226 226
query99 1062 1082 961 961
Total cold run time: 259978 ms
Total hot run time: 180417 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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #61996:
URL: https://github.com/apache/doris/pull/61996#issuecomment-4169851178
<details>
<summary>TPC-H: <b>Total hot run time: 29393 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 aba9f743a996ccde838c2e66f891339fcd943b52, data reload: false
------ Round 1 ----------------------------------
orders Doris NULL NULL 0 0 0 NULL 0 NULL NULL 2023-12-26 18:27:23 2023-12-26 18:42:55 NULL utf-8 NULL NULL
============================================
q1 17968 3824 3716 3716
q2 q3 10687 873 596 596
q4 4674 461 361 361
q5 7454 1341 1132 1132
q6 183 162 136 136
q7 908 941 776 776
q8 9504 1462 1394 1394
q9 6073 5408 5307 5307
q10 6291 2030 1741 1741
q11 508 273 274 273
q12 842 690 506 506
q13 18023 2781 2160 2160
q14 285 287 254 254
q15 q16 889 847 780 780
q17 1087 1211 828 828
q18 6330 5699 5635 5635
q19 1660 1314 1057 1057
q20 612 549 404 404
q21 4710 2429 1980 1980
q22 469 418 357 357
Total cold run time: 99157 ms
Total hot run time: 29393 ms
----- Round 2, with runtime_filter_mode=off -----
orders Doris NULL NULL 150000000 42 6422171781 NULL 22778155 NULL NULL 2023-12-26 18:27:23 2023-12-26 18:42:55 NULL utf-8 NULL NULL
============================================
q1 4503 4430 4353 4353
q2 q3 4635 4728 4157 4157
q4 2010 2295 1343 1343
q5 4897 4986 5183 4986
q6 208 170 133 133
q7 2041 1817 1620 1620
q8 3464 3106 3241 3106
q9 8519 8171 8183 8171
q10 4451 4468 4281 4281
q11 653 475 372 372
q12 653 709 488 488
q13 3067 3263 2471 2471
q14 298 300 274 274
q15 q16 753 789 720 720
q17 1323 1246 1251 1246
q18 7701 7037 6969 6969
q19 1157 1173 1151 1151
q20 2221 2189 1944 1944
q21 6448 5441 4792 4792
q22 539 494 421 421
Total cold run time: 59541 ms
Total hot run time: 52998 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] [refine](be) Refactor DataTypeNumberSerDe hierarchy: split base/final, sink if-constexpr branches [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #61996:
URL: https://github.com/apache/doris/pull/61996#discussion_r3026991220
##########
be/src/core/data_type_serde/data_type_date_serde.cpp:
##########
@@ -244,17 +193,17 @@ Status DataTypeDateSerDe<T>::_read_column_from_arrow(IColumn& column,
}
template <PrimitiveType T>
-Status DataTypeDateSerDe<T>::read_column_from_arrow(IColumn& column,
Review Comment:
`write_column_to_pb()` is newly split out here, but it still populates protobuf by reinterpreting the `VecDateTimeValue` object buffer as `int64_t*`. That relies on object layout/aliasing assumptions and is undefined behavior under optimization. Please append each row through an explicit representation-safe conversion instead, e.g. `binary_cast<VecDateTimeValue, Int64>(data[i])`, rather than passing a reinterpreted raw pointer range to protobuf.
--
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