You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Baymine (via GitHub)" <gi...@apache.org> on 2026/01/19 11:54:11 UTC
[PR] [fix](parser) Add NULL_TYPE support to Nereids parser grammar [doris]
Baymine opened a new pull request, #60034:
URL: https://github.com/apache/doris/pull/60034
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Broker load tasks fail with a `SyntaxParseException` when the load statement contains CASE expressions that return NULL values. The error occurs because the Nereids parser grammar doesn't recognize `null_type` as a valid data type keyword, even though the DataType parsing logic already supports it.
**Error Message:**
```
org.apache.doris.nereids.exceptions.SyntaxParseException:
mismatched input 'null_type' expecting {'AGG_STATE', 'ALL', 'ARRAY', 'BIGINT', ...}
```
Case statement
```sql
LOAD LABEL test_load
(
DATA INFILE("hdfs://namenode:9000/path/to/data.parquet")
INTO TABLE test_load_table
FORMAT AS "PARQUET"
(dt, order_id, parent_order_id, amount, deal_flag)
SET
(
status = CAST(COALESCE(deal_flag, '0') AS INT),
parent_order_id = CASE
WHEN deal_flag = '1' THEN parent_order_id
ELSE null
END
)
)
WITH BROKER 'hdfs_broker';
```
### 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] [fix](parser) Add NULL_TYPE support to Nereids parser grammar [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #60034:
URL: https://github.com/apache/doris/pull/60034#issuecomment-3768104086
<details>
<summary>TPC-DS: <b>Total hot run time: 173910 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 ae611d6cc3a638a1927123fb1dcbebaebd2fc339, data reload: false
query5 4431 619 488 488
query6 335 221 210 210
query7 4218 454 263 263
query8 356 253 240 240
query9 8687 2922 2896 2896
query10 550 402 344 344
query11 15233 15354 15917 15354
query12 184 118 114 114
query13 1293 531 420 420
query14 6217 3167 2909 2909
query14_1 2741 2788 2761 2761
query15 230 194 184 184
query16 1063 492 441 441
query17 1518 686 602 602
query18 2540 433 341 341
query19 224 226 189 189
query20 122 123 117 117
query21 203 133 112 112
query22 3873 3990 3784 3784
query23 16240 15837 15537 15537
query23_1 15502 15444 15432 15432
query24 7161 1523 1162 1162
query24_1 1156 1172 1143 1143
query25 536 447 394 394
query26 1242 272 151 151
query27 2753 444 275 275
query28 4509 2233 2171 2171
query29 736 502 407 407
query30 302 232 193 193
query31 806 599 564 564
query32 78 69 69 69
query33 516 320 294 294
query34 915 865 530 530
query35 706 779 668 668
query36 899 885 776 776
query37 142 97 79 79
query38 2753 2672 2650 2650
query39 791 750 727 727
query39_1 721 712 696 696
query40 216 136 114 114
query41 69 59 60 59
query42 98 101 102 101
query43 442 470 411 411
query44 1292 739 745 739
query45 182 182 173 173
query46 834 966 569 569
query47 1441 1492 1392 1392
query48 314 335 239 239
query49 602 436 343 343
query50 621 266 212 212
query51 3768 3798 3729 3729
query52 107 107 91 91
query53 287 325 267 267
query54 282 267 253 253
query55 82 76 77 76
query56 311 308 342 308
query57 1052 1013 939 939
query58 268 253 250 250
query59 2125 2238 2093 2093
query60 325 327 316 316
query61 154 149 158 149
query62 375 351 309 309
query63 293 266 264 264
query64 4927 1220 954 954
query65 3810 3780 3718 3718
query66 1453 431 319 319
query67 15609 15504 15505 15504
query68 2399 1095 797 797
query69 443 359 316 316
query70 937 941 918 918
query71 329 312 275 275
query72 5319 2424 3317 2424
query73 599 717 323 323
query74 8698 8756 8545 8545
query75 2768 2795 2428 2428
query76 2269 1053 654 654
query77 364 374 306 306
query78 9812 9973 9199 9199
query79 2219 880 592 592
query80 1672 581 480 480
query81 550 262 228 228
query82 987 151 114 114
query83 331 250 244 244
query84 252 113 97 97
query85 908 517 443 443
query86 408 295 292 292
query87 2861 2854 2735 2735
query88 3504 2571 2556 2556
query89 391 350 316 316
query90 2001 161 168 161
query91 172 156 143 143
query92 89 71 72 71
query93 1070 918 538 538
query94 646 344 302 302
query95 593 373 312 312
query96 635 507 233 233
query97 2310 2398 2301 2301
query98 217 204 196 196
query99 590 585 506 506
Total cold run time: 249062 ms
Total hot run time: 173910 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](parser) Add NULL_TYPE support to Nereids parser grammar [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #60034:
URL: https://github.com/apache/doris/pull/60034#issuecomment-3768123596
<details>
<summary>ClickBench: <b>Total hot run time: 26.86 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 ae611d6cc3a638a1927123fb1dcbebaebd2fc339, data reload: false
query1 0.05 0.04 0.04
query2 0.10 0.05 0.04
query3 0.25 0.09 0.09
query4 1.60 0.12 0.11
query5 0.26 0.25 0.25
query6 1.14 0.66 0.64
query7 0.03 0.02 0.03
query8 0.05 0.04 0.04
query9 0.57 0.50 0.49
query10 0.56 0.56 0.56
query11 0.15 0.10 0.10
query12 0.15 0.11 0.11
query13 0.62 0.58 0.59
query14 0.97 0.93 0.93
query15 0.79 0.78 0.78
query16 0.42 0.39 0.40
query17 1.06 1.05 1.06
query18 0.22 0.22 0.21
query19 1.91 1.91 1.88
query20 0.02 0.01 0.01
query21 15.44 0.24 0.15
query22 5.04 0.05 0.05
query23 16.03 0.28 0.10
query24 2.72 0.30 0.54
query25 0.09 0.05 0.08
query26 0.15 0.13 0.14
query27 0.09 0.07 0.07
query28 4.39 1.06 0.88
query29 12.53 3.94 3.13
query30 0.28 0.13 0.12
query31 2.81 0.63 0.40
query32 3.24 0.56 0.46
query33 2.98 2.98 3.07
query34 15.96 5.09 4.43
query35 4.51 4.42 4.42
query36 0.66 0.50 0.49
query37 0.11 0.07 0.07
query38 0.07 0.04 0.04
query39 0.04 0.03 0.03
query40 0.17 0.15 0.14
query41 0.09 0.04 0.03
query42 0.05 0.03 0.03
query43 0.04 0.04 0.04
Total cold run time: 98.41 s
Total hot run time: 26.86 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](parser) Add NULL_TYPE support to Nereids parser grammar [doris]
Posted by "zclllyybb (via GitHub)" <gi...@apache.org>.
zclllyybb commented on PR #60034:
URL: https://github.com/apache/doris/pull/60034#issuecomment-3769239007
where does null_type present in your stmt?
--
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](parser) Add NULL_TYPE support to Nereids parser grammar [doris]
Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #60034:
URL: https://github.com/apache/doris/pull/60034#issuecomment-3768220142
# FE UT Coverage Report
Increment line coverage `` :tada:
[Increment coverage report](http://coverage.selectdb-in.cc/coverage/60034_ae611d6cc3a638a1927123fb1dcbebaebd2fc339/fe_increment_report/index.html)
[Complete coverage report](http://coverage.selectdb-in.cc/coverage/60034_ae611d6cc3a638a1927123fb1dcbebaebd2fc339/fe_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](parser) Add NULL_TYPE support to Nereids parser grammar [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #60034: [fix](parser) Add NULL_TYPE support to Nereids parser grammar
URL: https://github.com/apache/doris/pull/60034
--
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](parser) Add NULL_TYPE support to Nereids parser grammar [doris]
Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #60034:
URL: https://github.com/apache/doris/pull/60034#issuecomment-3768058018
<details>
<summary>TPC-H: <b>Total hot run time: 31473 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 ae611d6cc3a638a1927123fb1dcbebaebd2fc339, data reload: false
------ Round 1 ----------------------------------
q1 17633 4138 4054 4054
q2 2045 356 243 243
q3 10137 1275 732 732
q4 10195 782 311 311
q5 7536 2088 1847 1847
q6 190 175 142 142
q7 939 801 674 674
q8 9280 1411 1189 1189
q9 4845 4661 4542 4542
q10 6749 1776 1402 1402
q11 489 310 279 279
q12 710 785 571 571
q13 17793 3822 3086 3086
q14 311 289 274 274
q15 597 505 509 505
q16 681 695 641 641
q17 657 815 486 486
q18 6722 6278 6342 6278
q19 1238 996 616 616
q20 386 357 257 257
q21 3069 2449 2361 2361
q22 1075 998 983 983
Total cold run time: 103277 ms
Total hot run time: 31473 ms
----- Round 2, with runtime_filter_mode=off -----
q1 4090 4016 4048 4016
q2 336 411 318 318
q3 2097 2636 2179 2179
q4 1327 1774 1365 1365
q5 4097 4020 3990 3990
q6 211 170 133 133
q7 1862 1809 1710 1710
q8 2907 2576 2492 2492
q9 7172 7203 7224 7203
q10 2671 2741 2253 2253
q11 557 475 444 444
q12 754 795 656 656
q13 3808 4099 3678 3678
q14 289 306 277 277
q15 550 510 533 510
q16 703 755 626 626
q17 1163 1282 1373 1282
q18 8127 7880 7759 7759
q19 920 973 943 943
q20 1973 2146 1943 1943
q21 4936 4536 4397 4397
q22 1115 1129 1034 1034
Total cold run time: 51665 ms
Total hot run time: 49208 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](parser) Add NULL_TYPE support to Nereids parser grammar [doris]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #60034:
URL: https://github.com/apache/doris/pull/60034#issuecomment-5013509287
We're closing this PR because it hasn't been updated in a while.
This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
If you'd like to revive this PR, please reopen it and feel free a maintainer to remove the Stale tag!
--
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](parser) Add NULL_TYPE support to Nereids parser grammar [doris]
Posted by "Thearas (via GitHub)" <gi...@apache.org>.
Thearas commented on PR #60034:
URL: https://github.com/apache/doris/pull/60034#issuecomment-3767956088
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] [fix](parser) Add NULL_TYPE support to Nereids parser grammar [doris]
Posted by "Baymine (via GitHub)" <gi...@apache.org>.
Baymine commented on PR #60034:
URL: https://github.com/apache/doris/pull/60034#issuecomment-3767959885
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