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](jdbc catalog) Use factory methods to return mapped types instead #46623

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

zy-kkk
Copy link
Member

@zy-kkk zy-kkk commented Jan 8, 2025

What problem does this PR solve?

Problem Summary:

We should use factory methods to create types instead of returning a type directly, because the returned type is static and final, which will cause problems with length setting.

Release note

None

Check List (For Author)

  • Test

    • 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
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Contributor

Thearas commented Jan 8, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See 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?

@zy-kkk
Copy link
Member Author

zy-kkk commented Jan 8, 2025

run buildall

morningman
morningman previously approved these changes Jan 8, 2025
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 8, 2025

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

Copy link
Contributor

github-actions bot commented Jan 8, 2025

PR approved by anyone and no changes requested.

@zy-kkk
Copy link
Member Author

zy-kkk commented Jan 8, 2025

run buildall

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Jan 8, 2025
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17585	6502	6059	6059
q2	2042	298	174	174
q3	10416	1249	684	684
q4	10221	844	426	426
q5	7501	2135	1954	1954
q6	207	179	151	151
q7	879	747	600	600
q8	9231	1335	1177	1177
q9	5355	4890	4880	4880
q10	6743	2282	1867	1867
q11	467	273	258	258
q12	337	359	220	220
q13	17772	3664	3026	3026
q14	246	223	214	214
q15	548	508	515	508
q16	638	609	587	587
q17	564	838	329	329
q18	7174	6436	6423	6423
q19	3165	951	539	539
q20	294	301	181	181
q21	2732	2164	1915	1915
q22	360	329	315	315
Total cold run time: 104477 ms
Total hot run time: 32487 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6355	6199	6235	6199
q2	232	331	228	228
q3	2238	2660	2289	2289
q4	1369	1803	1369	1369
q5	4318	4682	4788	4682
q6	185	182	144	144
q7	2115	1959	1812	1812
q8	2575	2737	2667	2667
q9	7205	7218	7190	7190
q10	3030	3278	2777	2777
q11	578	520	510	510
q12	675	762	598	598
q13	3384	3852	3220	3220
q14	292	287	294	287
q15	589	532	516	516
q16	636	708	656	656
q17	1186	1712	1258	1258
q18	7676	7357	7113	7113
q19	773	1124	1011	1011
q20	1888	2002	1836	1836
q21	5382	4986	4753	4753
q22	592	589	592	589
Total cold run time: 53273 ms
Total hot run time: 51704 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 187338 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 8a040126b09b4d5cda5cf0ce5f1859b73fdbbb62, data reload: false

query1	995	384	369	369
query2	6520	2365	2325	2325
query3	6709	215	214	214
query4	33665	23439	23076	23076
query5	4365	590	449	449
query6	298	200	186	186
query7	4632	495	315	315
query8	301	257	242	242
query9	9376	2768	2754	2754
query10	445	322	268	268
query11	18038	15407	15015	15015
query12	157	114	105	105
query13	1689	533	417	417
query14	9739	6451	7187	6451
query15	230	192	179	179
query16	8290	602	412	412
query17	1559	722	574	574
query18	2089	394	295	295
query19	211	185	156	156
query20	119	108	109	108
query21	212	123	103	103
query22	4536	4628	4347	4347
query23	33953	32832	33658	32832
query24	6351	2272	2233	2233
query25	477	436	381	381
query26	1113	268	154	154
query27	2221	445	324	324
query28	5588	2456	2465	2456
query29	519	526	407	407
query30	222	187	151	151
query31	958	878	792	792
query32	83	60	60	60
query33	490	341	298	298
query34	760	812	512	512
query35	759	777	718	718
query36	997	1032	962	962
query37	111	95	77	77
query38	4044	4002	3981	3981
query39	1456	1417	1426	1417
query40	201	114	102	102
query41	46	45	48	45
query42	117	110	103	103
query43	513	525	495	495
query44	1354	816	821	816
query45	175	162	159	159
query46	851	1023	628	628
query47	1864	1855	1784	1784
query48	384	409	317	317
query49	771	500	393	393
query50	623	655	382	382
query51	6893	6968	6837	6837
query52	128	101	91	91
query53	219	253	185	185
query54	471	491	407	407
query55	83	77	78	77
query56	256	262	250	250
query57	1167	1150	1066	1066
query58	236	230	224	224
query59	3038	3128	3005	3005
query60	271	270	247	247
query61	114	105	110	105
query62	859	760	700	700
query63	228	191	186	186
query64	4446	983	616	616
query65	3228	3104	3203	3104
query66	1031	410	316	316
query67	15732	15673	15438	15438
query68	7303	695	514	514
query69	465	282	258	258
query70	1177	1120	1063	1063
query71	401	276	252	252
query72	6126	3838	3970	3838
query73	650	741	355	355
query74	10099	8817	9108	8817
query75	3671	3103	2620	2620
query76	3420	1164	773	773
query77	747	346	272	272
query78	9986	9938	9407	9407
query79	3053	777	590	590
query80	751	501	415	415
query81	505	279	225	225
query82	396	153	122	122
query83	166	162	141	141
query84	240	93	71	71
query85	781	352	301	301
query86	385	284	288	284
query87	4575	4276	4452	4276
query88	5141	2200	2195	2195
query89	399	319	290	290
query90	1883	189	184	184
query91	134	136	110	110
query92	66	56	54	54
query93	2523	839	514	514
query94	659	394	289	289
query95	329	252	249	249
query96	494	599	280	280
query97	2776	2866	2832	2832
query98	234	222	195	195
query99	1381	1492	1359	1359
Total cold run time: 290492 ms
Total hot run time: 187338 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.04
query2	0.07	0.03	0.03
query3	0.24	0.07	0.07
query4	1.60	0.11	0.11
query5	0.42	0.41	0.41
query6	1.16	0.65	0.64
query7	0.03	0.02	0.01
query8	0.04	0.03	0.03
query9	0.59	0.51	0.50
query10	0.56	0.57	0.54
query11	0.14	0.11	0.10
query12	0.14	0.11	0.11
query13	0.61	0.60	0.59
query14	2.72	2.83	2.80
query15	0.89	0.83	0.82
query16	0.38	0.38	0.38
query17	1.06	0.99	1.05
query18	0.23	0.20	0.21
query19	1.92	1.84	1.99
query20	0.01	0.02	0.01
query21	15.38	0.87	0.59
query22	0.75	0.85	0.71
query23	15.17	1.42	0.57
query24	2.68	1.43	1.36
query25	0.20	0.23	0.10
query26	0.29	0.14	0.14
query27	0.07	0.05	0.04
query28	14.24	1.54	1.05
query29	12.60	3.90	3.29
query30	0.24	0.09	0.06
query31	2.82	0.59	0.38
query32	3.22	0.55	0.46
query33	3.13	3.07	3.10
query34	16.98	5.12	4.57
query35	4.61	4.54	4.52
query36	0.63	0.49	0.48
query37	0.09	0.06	0.06
query38	0.05	0.03	0.04
query39	0.03	0.02	0.03
query40	0.16	0.13	0.13
query41	0.08	0.03	0.02
query42	0.04	0.02	0.02
query43	0.04	0.04	0.03
Total cold run time: 106.34 s
Total hot run time: 31.91 s

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jan 9, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

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

@zy-kkk zy-kkk merged commit 9d28cf3 into apache:master Jan 9, 2025
30 of 31 checks passed
@zy-kkk zy-kkk deleted the jdbc_type_0108 branch January 9, 2025 03:25
github-actions bot pushed a commit that referenced this pull request Jan 9, 2025
#46623)

We should use factory methods to create types instead of returning a type directly, because the returned type is static and final, which will cause problems with length setting.
zy-kkk added a commit to zy-kkk/doris that referenced this pull request Jan 9, 2025
apache#46623)

We should use factory methods to create types instead of returning a type directly, because the returned type is static and final, which will cause problems with length setting.
morningman pushed a commit that referenced this pull request Jan 9, 2025
morningman pushed a commit that referenced this pull request Jan 9, 2025
…types instead #46623 (#46673)

Cherry-picked from #46623

Co-authored-by: zy-kkk <zhongyk10@gmail.com>
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/2.1.8-merged dev/3.0.4-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants