Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Error: missing field initializer #37403

Merged
merged 1 commit into from
Jul 18, 2024
Merged

[Fix] Error: missing field initializer #37403

merged 1 commit into from
Jul 18, 2024

Conversation

wyxxxcat
Copy link
Contributor

@wyxxxcat wyxxxcat commented Jul 7, 2024

Proposed changes

Issue Number: close #xxx

Compiling with -Werror turns a warning into an error , clang-18 now compiles correctly
3661EA809BCEE90A768E7876A80D1324.png

Copy link
Contributor

github-actions bot commented Jul 7, 2024

sh-checker report

To get the full details, please check in the job output.

shellcheck errors

'shellcheck ' returned error 1 finding the following syntactical issues:

----------

In build.sh line 289:
    local submodule_path=$1
    ^---------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 290:
    local submodule_name=$2
    ^---------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 291:
    local archive_url=$3
    ^------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 293:
    set +e
    ^----^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 294:
    cd "${DORIS_HOME}"
    ^----------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 295:
    echo "Update ${submodule_name} submodule ..."
    ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 296:
    git submodule update --init --recursive "${submodule_path}"
    ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 297:
    exit_code=$?
    ^----------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 298:
    if [[ "${exit_code}" -eq 0 ]]; then
    ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
       ^------------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 299:
        cd "${submodule_path}"
        ^--------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 300:
        submodule_commit_id=$(git rev-parse HEAD)
        ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
                              ^----------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 301:
        cd -
        ^--^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 302:
        expect_submodule_commit_id=$(git ls-tree HEAD "${submodule_path}" | awk '{print $3}')
        ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
                                     ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 303:
        echo "Current commit ID of ${submodule_name} submodule: ${submodule_commit_id}, expected is ${expect_submodule_commit_id}"
        ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 305:
    set -e
    ^----^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 306:
    if [[ "${exit_code}" -ne 0 ]]; then
    ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
       ^------------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 307:
        set +e
        ^----^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 309:
        submodule_commit=$(git ls-tree HEAD "${submodule_path}" | awk '{print $3}')
        ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
                           ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 310:
        exit_code=$?
        ^----------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 311:
        if [[ "${exit_code}" = "0" ]]; then
        ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
           ^------------------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 312:
            commit_specific_url=$(echo "${archive_url}" | sed "s/refs\/heads/${submodule_commit}/")
            ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).
                                  ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 314:
            commit_specific_url="${archive_url}"
            ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 316:
        set -e
        ^----^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 317:
        echo "Update ${submodule_name} submodule failed, start to download and extract ${commit_specific_url}"
        ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 319:
        mkdir -p "${DORIS_HOME}/${submodule_path}"
        ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).


In build.sh line 320:
        curl -L "${commit_specific_url}" | tar -xz -C "${DORIS_HOME}/${submodule_path}" --strip-components=1
        ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly).

For more information:
  https://www.shellcheck.net/wiki/SC2317 -- Command appears to be unreachable...
----------

You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
  # shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.



shfmt errors
'shfmt ' found no issues.

Copy link
Contributor

github-actions bot commented Jul 7, 2024

clang-tidy review says "All clean, LGTM! 👍"

@wyxxxcat
Copy link
Contributor Author

wyxxxcat commented Jul 7, 2024

run buildall

Copy link
Contributor

github-actions bot commented Jul 7, 2024

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TPC-H: Total hot run time: 43148 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 129e7214478f73624f844402dfe6c5457e65a4ec, data reload: false

------ Round 1 ----------------------------------
q1	18078	5024	4894	4894
q2	2882	199	192	192
q3	11162	1282	1201	1201
q4	10691	976	883	883
q5	7593	2925	2871	2871
q6	257	149	141	141
q7	1070	604	618	604
q8	9564	2336	2319	2319
q9	9055	6934	6969	6934
q10	9096	3887	3877	3877
q11	466	238	240	238
q12	438	234	242	234
q13	17896	3000	2976	2976
q14	285	235	228	228
q15	540	481	484	481
q16	487	373	376	373
q17	1028	736	704	704
q18	8241	7507	7573	7507
q19	3909	1580	1737	1580
q20	712	328	335	328
q21	5228	4257	4241	4241
q22	429	346	342	342
Total cold run time: 119107 ms
Total hot run time: 43148 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4811	4764	4720	4720
q2	406	269	259	259
q3	3152	2880	2864	2864
q4	1998	1625	1677	1625
q5	5470	5461	5481	5461
q6	243	134	136	134
q7	2273	1758	1723	1723
q8	3505	3648	3652	3648
q9	8495	8520	8494	8494
q10	4033	3766	3798	3766
q11	599	493	493	493
q12	819	652	618	618
q13	17484	2973	2983	2973
q14	291	265	267	265
q15	540	486	483	483
q16	472	414	416	414
q17	1957	1558	1538	1538
q18	7737	7563	7389	7389
q19	1924	1760	1690	1690
q20	2062	1775	1782	1775
q21	5163	4950	4906	4906
q22	643	571	536	536
Total cold run time: 74077 ms
Total hot run time: 55774 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 172188 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 129e7214478f73624f844402dfe6c5457e65a4ec, data reload: false

query1	909	374	366	366
query2	6463	2382	2393	2382
query3	6644	206	215	206
query4	28206	17445	17295	17295
query5	4224	494	504	494
query6	278	196	171	171
query7	4627	296	296	296
query8	331	298	314	298
query9	8439	2368	2348	2348
query10	609	332	285	285
query11	12871	10040	10211	10040
query12	148	84	83	83
query13	1645	383	383	383
query14	10720	7174	7829	7174
query15	262	184	183	183
query16	7983	305	312	305
query17	1825	543	523	523
query18	1816	280	279	279
query19	196	158	145	145
query20	89	80	82	80
query21	219	129	129	129
query22	4557	4036	4033	4033
query23	33688	33017	33135	33017
query24	10972	2854	2725	2725
query25	622	372	368	368
query26	1458	150	157	150
query27	2993	315	315	315
query28	7579	2054	2073	2054
query29	960	616	628	616
query30	280	148	146	146
query31	954	728	743	728
query32	97	55	52	52
query33	766	287	296	287
query34	992	491	492	491
query35	724	616	599	599
query36	1057	934	913	913
query37	148	72	72	72
query38	2859	2764	2779	2764
query39	856	809	812	809
query40	286	125	122	122
query41	59	52	52	52
query42	122	98	103	98
query43	583	555	556	555
query44	1229	749	735	735
query45	191	163	161	161
query46	1075	727	713	713
query47	1885	1753	1831	1753
query48	385	299	298	298
query49	1135	419	435	419
query50	783	390	400	390
query51	6837	6789	6764	6764
query52	110	91	96	91
query53	362	289	289	289
query54	934	443	451	443
query55	76	71	72	71
query56	295	265	269	265
query57	1145	1048	1048	1048
query58	262	244	242	242
query59	3464	3382	3122	3122
query60	319	282	278	278
query61	96	97	95	95
query62	629	457	470	457
query63	334	295	286	286
query64	10031	2205	1635	1635
query65	3197	3113	3136	3113
query66	1367	340	331	331
query67	15410	15244	14932	14932
query68	4614	531	533	531
query69	610	387	350	350
query70	1167	1171	1144	1144
query71	433	284	278	278
query72	7541	5234	5713	5234
query73	759	322	322	322
query74	6088	5484	5561	5484
query75	3638	2663	2757	2663
query76	3094	913	946	913
query77	686	309	304	304
query78	9456	9027	8838	8838
query79	2888	517	512	512
query80	2134	486	471	471
query81	580	224	219	219
query82	1446	111	105	105
query83	289	169	165	165
query84	278	89	93	89
query85	1569	315	303	303
query86	485	338	299	299
query87	3305	3102	3084	3084
query88	4449	2496	2473	2473
query89	485	387	383	383
query90	1810	194	193	193
query91	131	101	103	101
query92	59	50	51	50
query93	3046	507	499	499
query94	1237	212	215	212
query95	410	315	320	315
query96	598	281	276	276
query97	3179	3010	3000	3000
query98	291	197	201	197
query99	1286	819	833	819
Total cold run time: 290708 ms
Total hot run time: 172188 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 31.1 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 129e7214478f73624f844402dfe6c5457e65a4ec, data reload: false

query1	0.04	0.03	0.03
query2	0.08	0.04	0.04
query3	0.22	0.05	0.05
query4	1.67	0.08	0.07
query5	0.50	0.48	0.49
query6	1.14	0.73	0.73
query7	0.02	0.01	0.01
query8	0.05	0.04	0.05
query9	0.53	0.48	0.49
query10	0.54	0.54	0.54
query11	0.14	0.12	0.11
query12	0.14	0.12	0.13
query13	0.58	0.59	0.58
query14	0.76	0.79	0.79
query15	0.85	0.80	0.81
query16	0.37	0.37	0.36
query17	0.98	0.96	0.94
query18	0.22	0.25	0.24
query19	1.81	1.71	1.69
query20	0.01	0.01	0.01
query21	15.40	0.73	0.64
query22	3.78	7.21	2.38
query23	18.30	1.38	1.34
query24	2.19	0.22	0.21
query25	0.16	0.09	0.10
query26	0.29	0.21	0.22
query27	0.45	0.23	0.23
query28	13.31	1.01	0.99
query29	12.66	3.37	3.36
query30	0.26	0.06	0.06
query31	2.91	0.38	0.39
query32	3.28	0.47	0.48
query33	2.91	2.94	2.90
query34	16.97	4.34	4.31
query35	4.40	4.41	4.41
query36	0.65	0.45	0.47
query37	0.17	0.15	0.15
query38	0.14	0.15	0.14
query39	0.04	0.04	0.03
query40	0.15	0.12	0.13
query41	0.10	0.05	0.04
query42	0.05	0.04	0.05
query43	0.04	0.04	0.04
Total cold run time: 109.26 s
Total hot run time: 31.1 s

Copy link
Contributor

@zclllyybb zclllyybb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

github-actions bot commented Jul 8, 2024

PR approved by anyone and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jul 17, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@zclllyybb
Copy link
Contributor

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 40093 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 129e7214478f73624f844402dfe6c5457e65a4ec, data reload: false

------ Round 1 ----------------------------------
q1	17625	4549	4474	4474
q2	2014	190	183	183
q3	10523	1186	1088	1088
q4	10221	762	774	762
q5	7546	2704	2606	2606
q6	217	138	137	137
q7	956	601	591	591
q8	9221	2123	2090	2090
q9	8698	6598	6589	6589
q10	8739	3782	3819	3782
q11	446	239	234	234
q12	469	218	223	218
q13	17869	2973	2974	2973
q14	279	229	234	229
q15	514	488	491	488
q16	505	380	376	376
q17	982	574	652	574
q18	8093	7578	7475	7475
q19	7701	1473	1397	1397
q20	652	319	328	319
q21	4953	3240	3259	3240
q22	341	286	268	268
Total cold run time: 118564 ms
Total hot run time: 40093 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4457	4340	4276	4276
q2	374	256	253	253
q3	3058	2921	2938	2921
q4	2042	1776	1706	1706
q5	5603	5626	5492	5492
q6	229	134	134	134
q7	2223	1877	1866	1866
q8	3264	3429	3435	3429
q9	8815	8905	8852	8852
q10	4133	3820	3809	3809
q11	594	513	509	509
q12	812	664	659	659
q13	15865	3210	3188	3188
q14	322	285	284	284
q15	522	492	481	481
q16	496	435	438	435
q17	1845	1575	1500	1500
q18	8106	7814	7699	7699
q19	1745	1688	1651	1651
q20	2095	1886	1870	1870
q21	5245	4958	4686	4686
q22	587	529	499	499
Total cold run time: 72432 ms
Total hot run time: 56199 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 173912 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 129e7214478f73624f844402dfe6c5457e65a4ec, data reload: false

query1	917	381	379	379
query2	6462	1878	1785	1785
query3	6630	212	228	212
query4	27840	17371	17391	17371
query5	3681	473	477	473
query6	272	167	160	160
query7	4577	299	287	287
query8	235	197	188	188
query9	8608	2430	2411	2411
query10	416	272	283	272
query11	11026	10006	10140	10006
query12	112	80	85	80
query13	1632	371	362	362
query14	10079	7651	7924	7651
query15	212	164	164	164
query16	7710	305	314	305
query17	1565	572	540	540
query18	1918	272	272	272
query19	198	144	152	144
query20	92	80	80	80
query21	210	122	129	122
query22	4358	3954	3930	3930
query23	33840	33409	33470	33409
query24	10725	2912	2943	2912
query25	605	426	405	405
query26	708	154	154	154
query27	2370	284	286	284
query28	6090	2112	2096	2096
query29	907	654	700	654
query30	262	154	157	154
query31	983	760	768	760
query32	96	57	66	57
query33	700	335	324	324
query34	900	500	506	500
query35	708	635	663	635
query36	1124	969	950	950
query37	143	81	84	81
query38	2983	2877	2809	2809
query39	907	849	832	832
query40	204	121	121	121
query41	45	43	43	43
query42	115	106	101	101
query43	489	476	476	476
query44	1103	724	728	724
query45	193	163	161	161
query46	1095	751	715	715
query47	1866	1778	1765	1765
query48	361	302	293	293
query49	828	451	408	408
query50	776	386	389	386
query51	6855	6874	6779	6779
query52	100	95	90	90
query53	363	308	302	302
query54	849	445	444	444
query55	74	76	77	76
query56	293	271	269	269
query57	1118	1092	1050	1050
query58	242	250	244	244
query59	2874	2610	2623	2610
query60	295	283	282	282
query61	99	96	121	96
query62	784	629	645	629
query63	312	288	289	288
query64	9169	2201	1999	1999
query65	3185	3087	3099	3087
query66	739	330	339	330
query67	15302	15045	15152	15045
query68	4624	552	555	552
query69	510	338	333	333
query70	1174	1118	1137	1118
query71	433	297	281	281
query72	8261	5789	5516	5516
query73	748	332	327	327
query74	6109	5687	5709	5687
query75	3490	2680	2746	2680
query76	2565	925	944	925
query77	624	307	304	304
query78	9752	8989	8965	8965
query79	2820	539	529	529
query80	1695	470	490	470
query81	599	217	218	217
query82	887	138	133	133
query83	316	165	164	164
query84	277	96	85	85
query85	1829	306	312	306
query86	454	289	302	289
query87	3283	3069	3081	3069
query88	4406	2393	2385	2385
query89	491	387	382	382
query90	1890	185	193	185
query91	130	102	102	102
query92	59	51	49	49
query93	4335	529	515	515
query94	1250	219	226	219
query95	411	312	320	312
query96	613	270	272	270
query97	3260	3053	3040	3040
query98	244	198	198	198
query99	1532	1282	1287	1282
Total cold run time: 281600 ms
Total hot run time: 173912 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 30.95 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 129e7214478f73624f844402dfe6c5457e65a4ec, data reload: false

query1	0.04	0.03	0.02
query2	0.08	0.04	0.04
query3	0.22	0.05	0.06
query4	1.68	0.07	0.07
query5	0.50	0.49	0.49
query6	1.14	0.74	0.72
query7	0.02	0.02	0.02
query8	0.05	0.05	0.05
query9	0.55	0.50	0.48
query10	0.55	0.54	0.55
query11	0.15	0.11	0.11
query12	0.15	0.12	0.12
query13	0.58	0.60	0.58
query14	0.75	0.80	0.79
query15	0.85	0.82	0.81
query16	0.37	0.37	0.36
query17	0.95	1.00	0.97
query18	0.23	0.22	0.22
query19	1.81	1.66	1.78
query20	0.01	0.01	0.01
query21	15.42	0.74	0.66
query22	4.28	7.04	2.20
query23	18.29	1.33	1.34
query24	2.07	0.27	0.22
query25	0.15	0.08	0.08
query26	0.29	0.22	0.21
query27	0.45	0.24	0.23
query28	13.22	1.01	1.00
query29	12.60	3.31	3.27
query30	0.27	0.06	0.06
query31	2.89	0.39	0.39
query32	3.24	0.47	0.48
query33	2.89	2.88	2.89
query34	16.91	4.38	4.41
query35	4.47	4.41	4.49
query36	0.66	0.46	0.46
query37	0.19	0.16	0.16
query38	0.15	0.14	0.14
query39	0.05	0.04	0.03
query40	0.14	0.12	0.12
query41	0.09	0.05	0.05
query42	0.05	0.05	0.05
query43	0.04	0.04	0.04
Total cold run time: 109.49 s
Total hot run time: 30.95 s

@HappenLee HappenLee merged commit 52972fc into apache:master Jul 18, 2024
27 of 31 checks passed
dataroaring pushed a commit that referenced this pull request Jul 19, 2024
Compiling with -Werror turns a warning into an error , clang-18 now compiles correctly
HappenLee pushed a commit that referenced this pull request Oct 22, 2024
…42215)

Earlier, we turned on the -Wno-missing-field-initializers and
-Wno-unused-const-variable switches, now choose to disable them

same as #37403
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/3.0.1-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants