You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Yulei-Yang (via GitHub)" <gi...@apache.org> on 2024/09/11 09:06:17 UTC

[PR] [feature](schema) support temporary table like mysql/sr [doris]

Yulei-Yang opened a new pull request, #40680:
URL: https://github.com/apache/doris/pull/40680

   add a table type: temporary table: a materialized table which only available in the session it be created.
   Another feature:
   can have same name with common table in the same db.
   
   Doc of starrocks: https://docs.starrocks.io/zh/docs/table_design/StarRocks_table_design/#%E4%B8%B4%E6%97%B6%E8%A1%A8
   


-- 
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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2357707674

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2426011313

   run cloud_p0


-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2425850239

   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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2360613050

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 41799 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 8a7f49edf83295e5384354cfefc52f54571482cc, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	18151	7689	7329	7329
   q2	2454	163	171	163
   q3	11799	1210	1228	1210
   q4	10343	787	708	708
   q5	7861	3212	3140	3140
   q6	234	160	150	150
   q7	1020	639	638	638
   q8	9599	2098	2082	2082
   q9	6908	6433	6430	6430
   q10	7002	2323	2320	2320
   q11	436	241	248	241
   q12	410	225	220	220
   q13	17794	2969	3004	2969
   q14	238	221	227	221
   q15	574	542	516	516
   q16	679	638	614	614
   q17	1004	824	814	814
   q18	7223	6654	6668	6654
   q19	1408	936	927	927
   q20	613	307	273	273
   q21	4404	3381	3210	3210
   q22	1076	990	970	970
   Total cold run time: 111230 ms
   Total hot run time: 41799 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	7258	7242	7236	7236
   q2	326	225	224	224
   q3	2938	2778	2810	2778
   q4	1973	1700	1744	1700
   q5	5401	5426	5389	5389
   q6	226	148	142	142
   q7	2074	1719	1729	1719
   q8	3222	3367	3344	3344
   q9	8408	8434	8408	8408
   q10	3375	3385	3385	3385
   q11	593	472	460	460
   q12	778	585	614	585
   q13	6165	3026	2996	2996
   q14	291	277	269	269
   q15	557	509	502	502
   q16	704	679	670	670
   q17	1767	1553	1546	1546
   q18	7820	7521	7347	7347
   q19	1684	1515	1655	1515
   q20	2057	1807	1785	1785
   q21	5443	5226	5304	5226
   q22	1101	1008	989	989
   Total cold run time: 64161 ms
   Total hot run time: 58215 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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2563588760

   run feut


-- 
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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2357500587

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 31.39 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 aca156b6053792865f2c476c9e4de21a496c41b3, data reload: false
   
   query1	0.04	0.04	0.04
   query2	0.06	0.03	0.03
   query3	0.23	0.06	0.06
   query4	1.65	0.09	0.10
   query5	0.51	0.50	0.53
   query6	1.13	0.72	0.72
   query7	0.02	0.01	0.02
   query8	0.04	0.03	0.03
   query9	0.56	0.49	0.50
   query10	0.55	0.54	0.54
   query11	0.14	0.11	0.11
   query12	0.13	0.11	0.11
   query13	0.62	0.59	0.59
   query14	2.97	3.02	2.94
   query15	0.89	0.82	0.82
   query16	0.37	0.38	0.39
   query17	1.01	1.04	1.07
   query18	0.22	0.20	0.21
   query19	1.84	1.81	1.98
   query20	0.01	0.01	0.01
   query21	15.36	0.60	0.59
   query22	3.15	2.35	1.06
   query23	17.17	0.84	0.76
   query24	2.52	1.31	0.52
   query25	0.24	0.11	0.09
   query26	0.45	0.14	0.13
   query27	0.05	0.05	0.04
   query28	11.46	1.09	1.07
   query29	12.55	3.21	3.16
   query30	0.24	0.06	0.06
   query31	2.90	0.38	0.36
   query32	3.27	0.47	0.47
   query33	2.99	3.05	3.03
   query34	16.91	4.37	4.37
   query35	4.41	4.46	4.38
   query36	0.67	0.48	0.48
   query37	0.08	0.06	0.06
   query38	0.05	0.04	0.03
   query39	0.03	0.02	0.02
   query40	0.17	0.13	0.13
   query41	0.07	0.02	0.02
   query42	0.04	0.02	0.02
   query43	0.03	0.02	0.02
   Total cold run time: 107.8 s
   Total hot run time: 31.39 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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2359968512

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 32.3 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 e97affcafd8ad06d45d0fd4f0dd50d4342f39ef4, data reload: false
   
   query1	0.04	0.04	0.04
   query2	0.06	0.02	0.02
   query3	0.23	0.07	0.07
   query4	1.63	0.10	0.10
   query5	0.49	0.52	0.50
   query6	1.13	0.73	0.73
   query7	0.02	0.01	0.02
   query8	0.04	0.03	0.03
   query9	0.56	0.50	0.48
   query10	0.55	0.57	0.55
   query11	0.14	0.11	0.10
   query12	0.14	0.11	0.11
   query13	0.61	0.59	0.59
   query14	3.00	2.96	2.96
   query15	0.90	0.82	0.82
   query16	0.37	0.37	0.39
   query17	1.07	1.05	1.00
   query18	0.22	0.22	0.21
   query19	1.98	1.90	1.99
   query20	0.01	0.01	0.01
   query21	15.35	0.61	0.59
   query22	2.62	2.05	1.67
   query23	17.48	0.85	0.78
   query24	2.56	1.51	0.66
   query25	0.21	0.11	0.08
   query26	0.46	0.14	0.14
   query27	0.04	0.04	0.04
   query28	11.07	1.09	1.07
   query29	12.55	3.25	3.23
   query30	0.25	0.06	0.06
   query31	2.87	0.39	0.38
   query32	3.29	0.47	0.45
   query33	2.95	3.06	3.02
   query34	16.62	4.31	4.43
   query35	4.49	4.44	4.45
   query36	0.68	0.49	0.49
   query37	0.08	0.05	0.06
   query38	0.04	0.04	0.03
   query39	0.03	0.02	0.02
   query40	0.16	0.12	0.13
   query41	0.07	0.02	0.02
   query42	0.03	0.03	0.02
   query43	0.03	0.03	0.03
   Total cold run time: 107.12 s
   Total hot run time: 32.3 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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2564287554

   run p0


-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1948925992


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java:
##########
@@ -569,7 +589,33 @@ public Table getTableNullable(String tableName) {
                 return null;
             }
         }
-        return nameToTable.get(tableName);
+
+        // return temp table first
+        Table table = nameToTable.get(Util.generateTempTableInnerName(tableName));

Review Comment:
   so temporary table's name could same with permanent table?



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2424691587

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2706334670

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 31.41 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 4023ed7d094f26de95d765585f31c2abe6a75def, data reload: false
   
   query1	0.03	0.03	0.03
   query2	0.10	0.05	0.05
   query3	0.28	0.06	0.04
   query4	1.60	0.07	0.08
   query5	0.57	0.56	0.55
   query6	1.18	0.74	0.72
   query7	0.02	0.01	0.02
   query8	0.05	0.05	0.05
   query9	0.63	0.53	0.53
   query10	0.58	0.59	0.59
   query11	0.24	0.13	0.12
   query12	0.26	0.13	0.12
   query13	0.63	0.62	0.62
   query14	2.80	2.68	2.82
   query15	0.99	0.87	0.87
   query16	0.36	0.38	0.37
   query17	1.04	1.08	1.03
   query18	0.19	0.19	0.18
   query19	2.08	1.86	1.84
   query20	0.02	0.01	0.02
   query21	15.37	0.99	0.67
   query22	0.93	1.03	0.78
   query23	14.71	1.51	0.75
   query24	5.35	0.58	0.28
   query25	0.16	0.09	0.09
   query26	0.55	0.21	0.18
   query27	0.09	0.09	0.09
   query28	11.00	1.15	0.57
   query29	12.53	4.12	3.36
   query30	0.29	0.08	0.06
   query31	2.82	0.62	0.44
   query32	3.23	0.59	0.50
   query33	3.03	3.04	3.12
   query34	16.57	5.15	4.46
   query35	4.51	4.53	4.54
   query36	0.68	0.49	0.50
   query37	0.21	0.18	0.17
   query38	0.17	0.15	0.14
   query39	0.05	0.04	0.04
   query40	0.20	0.16	0.15
   query41	0.10	0.05	0.05
   query42	0.06	0.05	0.05
   query43	0.05	0.05	0.04
   Total cold run time: 106.31 s
   Total hot run time: 31.41 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] [feature](schema) support temporary table like mysql [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2709356378

   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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2359936064

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2564145645

   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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2357747161

   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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2357815155

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 41537 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 852fef17e5cc332d4eeb59b47a46b7fb89c0fe76, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	17627	7301	7231	7231
   q2	2058	166	161	161
   q3	10599	1117	1159	1117
   q4	10566	770	767	767
   q5	7737	3056	3050	3050
   q6	232	153	151	151
   q7	1012	629	626	626
   q8	9417	2044	2062	2044
   q9	6917	6386	6395	6386
   q10	7005	2253	2250	2250
   q11	435	259	259	259
   q12	415	220	221	220
   q13	17780	2974	2980	2974
   q14	255	215	226	215
   q15	577	540	532	532
   q16	677	626	613	613
   q17	967	753	762	753
   q18	7255	6667	6744	6667
   q19	1396	1018	993	993
   q20	587	290	285	285
   q21	4013	3233	3430	3233
   q22	1103	1010	1014	1010
   Total cold run time: 108630 ms
   Total hot run time: 41537 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	7280	7331	7320	7320
   q2	315	229	226	226
   q3	3036	2991	3007	2991
   q4	2022	1838	1870	1838
   q5	5593	5610	5551	5551
   q6	228	156	146	146
   q7	2302	1857	1821	1821
   q8	3366	3476	3472	3472
   q9	8807	8962	8799	8799
   q10	3564	3370	3438	3370
   q11	596	489	485	485
   q12	825	626	586	586
   q13	9234	3247	3181	3181
   q14	322	288	272	272
   q15	583	534	504	504
   q16	728	670	683	670
   q17	1804	1611	1601	1601
   q18	8263	7904	7873	7873
   q19	1724	1669	1546	1546
   q20	2121	1896	1911	1896
   q21	5516	5451	5451	5451
   q22	1159	1041	1027	1027
   Total cold run time: 69388 ms
   Total hot run time: 60626 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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2357465099

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1971201444


##########
fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java:
##########
@@ -127,7 +127,7 @@ public void processCreateMaterializedView(CreateMaterializedViewStmt stmt)
         Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(dbName);
         Env.getCurrentInternalCatalog().checkAvailableCapacity(db);
 
-        OlapTable olapTable = (OlapTable) db.getTableOrMetaException(tableName, TableType.OLAP);
+        OlapTable olapTable = (OlapTable) db.getNonTempTableOrMetaException(tableName, TableType.OLAP);

Review Comment:
   Due to their lifecycle difference. A mtmv created base on temporary table will not work after session closed



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1975312060


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowPartitionIdCommand.java:
##########
@@ -84,13 +90,22 @@ private ShowResultSet handleShowPartitionId(ConnectContext ctx, StmtExecutor exe
                         if (partition != null) {
                             List<String> row = new ArrayList<>();
                             row.add(database.getFullName());
-                            row.add(tbl.getName());
+                            if (tbl.isTemporary()) {
+                                if (!Util.isTempTableInCurrentSession(tbl.getName())) {
+                                    continue;
+                                }
+                                row.add(Util.getTempTableDisplayName(tbl.getName()));

Review Comment:
   done



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1983225192


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java:
##########
@@ -381,6 +382,19 @@ public void checkQuota() throws DdlException {
         checkReplicaQuota();
     }
 
+    public boolean isTableExist(String tableName, boolean isTemporary) {
+        if (Env.isTableNamesCaseInsensitive()) {
+            tableName = tableName.toLowerCase();
+        }
+
+        if (isTemporary) {
+            Set<String> tableSet = ConnectContext.get().getDbToTempTableNamesMap().get(fullQualifiedName);
+            return tableSet != null && tableSet.contains(tableName);
+        } else {
+            return nameToTable.containsKey(tableName);
+        }
+    }
+
     public boolean isTableExist(String tableName) {

Review Comment:
   done



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java:
##########
@@ -381,6 +382,19 @@ public void checkQuota() throws DdlException {
         checkReplicaQuota();
     }
 
+    public boolean isTableExist(String tableName, boolean isTemporary) {
+        if (Env.isTableNamesCaseInsensitive()) {
+            tableName = tableName.toLowerCase();

Review Comment:
   fixed



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2563478568

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2564161081

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 32697 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 a2d642a6ec8d0d1fa0787e08f47b5a0263a17789, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	17602	6128	6010	6010
   q2	2054	303	179	179
   q3	10396	1217	755	755
   q4	10210	865	458	458
   q5	7505	2175	1980	1980
   q6	205	184	152	152
   q7	897	753	603	603
   q8	9226	1337	1192	1192
   q9	5253	4902	4923	4902
   q10	6758	2286	1850	1850
   q11	475	284	254	254
   q12	357	367	222	222
   q13	17748	3545	3011	3011
   q14	235	239	206	206
   q15	554	522	492	492
   q16	651	617	601	601
   q17	592	852	345	345
   q18	7244	6540	6428	6428
   q19	1437	978	571	571
   q20	316	319	192	192
   q21	2883	2257	1978	1978
   q22	366	342	316	316
   Total cold run time: 102964 ms
   Total hot run time: 32697 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	6256	6182	6197	6182
   q2	230	327	251	251
   q3	2296	2713	2316	2316
   q4	1388	1832	1384	1384
   q5	4327	4842	4749	4749
   q6	192	178	147	147
   q7	2111	1961	1838	1838
   q8	2603	2838	2696	2696
   q9	7259	7270	7367	7270
   q10	3093	3353	2883	2883
   q11	583	518	497	497
   q12	660	742	643	643
   q13	3422	3756	3174	3174
   q14	311	304	277	277
   q15	572	518	512	512
   q16	673	689	636	636
   q17	1226	1764	1259	1259
   q18	7721	7506	7247	7247
   q19	874	1147	1145	1145
   q20	1962	2030	1928	1928
   q21	5713	5354	4983	4983
   q22	634	605	593	593
   Total cold run time: 54106 ms
   Total hot run time: 52610 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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2564166135

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 31.49 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 a2d642a6ec8d0d1fa0787e08f47b5a0263a17789, data reload: false
   
   query1	0.03	0.03	0.03
   query2	0.08	0.04	0.05
   query3	0.24	0.05	0.05
   query4	1.64	0.09	0.09
   query5	0.40	0.41	0.39
   query6	1.15	0.67	0.66
   query7	0.02	0.02	0.02
   query8	0.06	0.04	0.04
   query9	0.57	0.50	0.51
   query10	0.56	0.58	0.56
   query11	0.17	0.12	0.12
   query12	0.15	0.13	0.13
   query13	0.61	0.59	0.61
   query14	2.74	2.72	2.71
   query15	0.91	0.86	0.83
   query16	0.38	0.38	0.38
   query17	0.97	1.04	1.04
   query18	0.19	0.19	0.19
   query19	1.94	1.86	2.08
   query20	0.01	0.01	0.01
   query21	15.35	0.95	0.66
   query22	0.76	0.79	0.70
   query23	15.00	1.52	0.67
   query24	2.17	0.37	0.22
   query25	0.14	0.09	0.09
   query26	0.28	0.18	0.17
   query27	0.08	0.08	0.08
   query28	13.45	1.85	1.14
   query29	12.69	4.12	3.43
   query30	0.24	0.08	0.05
   query31	2.84	0.59	0.39
   query32	3.23	0.58	0.49
   query33	3.18	3.09	3.10
   query34	16.31	5.13	4.49
   query35	4.53	4.51	4.49
   query36	0.64	0.48	0.48
   query37	0.19	0.16	0.16
   query38	0.17	0.16	0.14
   query39	0.05	0.04	0.05
   query40	0.18	0.13	0.13
   query41	0.10	0.05	0.05
   query42	0.06	0.05	0.06
   query43	0.05	0.04	0.04
   Total cold run time: 104.51 s
   Total hot run time: 31.49 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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1978829193


##########
fe/fe-core/src/main/java/org/apache/doris/backup/BackupHandler.java:
##########
@@ -435,14 +436,27 @@ private void backup(Repository repository, Database db, BackupStmt stmt) throws
                 if (Config.ignore_backup_not_support_table_type) {
                     LOG.warn("Table '{}' is a {} table, can not backup and ignore it."
                             + "Only OLAP(Doris)/ODBC/VIEW table can be backed up",
-                            tblName, tbl.getType().toString());
+                            tblName, tbl.isTemporary() ? "temporary" : tbl.getType().toString());
                     tblRefsNotSupport.add(tblRef);
                     continue;
                 } else {
                     ErrorReport.reportDdlException(ErrorCode.ERR_NOT_OLAP_TABLE, tblName);
                 }
             }
 
+            if (tbl.isTemporary()) {
+                if (Config.ignore_backup_not_support_table_type) {
+                    LOG.warn("Table '{}' is a temporary table, can not backup and ignore it."
+                            + "Only OLAP(Doris)/ODBC/VIEW table can be backed up",
+                            Util.getTempTableDisplayName(tblName));
+                    tblRefsNotSupport.add(tblRef);
+                    continue;
+                } else {
+                    ErrorReport.reportDdlException("Table " + Util.getTempTableDisplayName(tblName)

Review Comment:
   As discussed, if a backup job only contains one temporary table, will throw error. While, if a backup job contains temporary table and other olap table, will just ignore temporary table, and the backup job will run. 
   Done



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2705760690

   TeamCity cloud ut coverage result:
    Function Coverage: 82.15% (1063/1294) 
    Line Coverage: 65.70% (17634/26840)
    Region Coverage: 65.16% (8692/13340)
    Branch Coverage: 55.09% (4688/8510)
    Coverage Report: http://coverage.selectdb-in.cc/coverage/5b80f6d3e35a336c82550aa9ece08e05e8348c8c_5b80f6d3e35a336c82550aa9ece08e05e8348c8c_cloud/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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2343148772

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2425684550

   run p0


-- 
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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2359952493

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 42006 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 e97affcafd8ad06d45d0fd4f0dd50d4342f39ef4, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	18331	7566	7369	7369
   q2	2162	161	158	158
   q3	11563	1185	1226	1185
   q4	10579	751	799	751
   q5	7854	3184	3140	3140
   q6	241	151	153	151
   q7	1014	626	607	607
   q8	9570	2013	2011	2011
   q9	6810	6418	6418	6418
   q10	7109	2331	2297	2297
   q11	437	253	253	253
   q12	414	227	213	213
   q13	17781	3002	2995	2995
   q14	237	222	212	212
   q15	573	517	522	517
   q16	703	618	607	607
   q17	965	837	804	804
   q18	7341	6867	6771	6771
   q19	1412	1025	1057	1025
   q20	602	299	278	278
   q21	4013	3238	3336	3238
   q22	1126	1006	1026	1006
   Total cold run time: 110837 ms
   Total hot run time: 42006 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	7245	7222	7204	7204
   q2	333	222	227	222
   q3	2928	2773	2802	2773
   q4	1949	1742	1695	1695
   q5	5350	5390	5440	5390
   q6	226	143	142	142
   q7	2106	1728	1697	1697
   q8	3168	3345	3345	3345
   q9	8400	8462	8476	8462
   q10	3399	3398	3372	3372
   q11	588	473	473	473
   q12	774	556	574	556
   q13	4171	3030	2982	2982
   q14	306	275	260	260
   q15	556	514	520	514
   q16	711	695	668	668
   q17	1752	1583	1541	1541
   q18	7728	7416	7397	7397
   q19	1665	1592	1480	1480
   q20	2027	1789	1832	1789
   q21	5465	5125	5266	5125
   q22	1100	1036	1015	1015
   Total cold run time: 61947 ms
   Total hot run time: 58102 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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2357495412

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 194718 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 aca156b6053792865f2c476c9e4de21a496c41b3, data reload: false
   
   query1	939	363	382	363
   query2	6548	2063	1959	1959
   query3	6704	211	225	211
   query4	34536	23446	23412	23412
   query5	4299	489	462	462
   query6	269	181	166	166
   query7	4615	296	323	296
   query8	295	228	222	222
   query9	9544	2660	2657	2657
   query10	467	290	300	290
   query11	18129	15222	15322	15222
   query12	154	101	96	96
   query13	1627	420	391	391
   query14	10357	7599	7501	7501
   query15	269	175	179	175
   query16	7574	426	483	426
   query17	1664	581	567	567
   query18	2023	299	304	299
   query19	406	144	141	141
   query20	114	102	107	102
   query21	211	103	102	102
   query22	4564	4239	4204	4204
   query23	34634	34004	34756	34004
   query24	11090	2926	2893	2893
   query25	532	377	387	377
   query26	926	163	153	153
   query27	2573	288	284	284
   query28	7771	2436	2456	2436
   query29	646	426	401	401
   query30	320	155	154	154
   query31	989	767	831	767
   query32	100	54	54	54
   query33	760	285	285	285
   query34	977	495	491	491
   query35	885	710	730	710
   query36	1082	954	902	902
   query37	140	82	87	82
   query38	4065	3897	3872	3872
   query39	1439	1404	1393	1393
   query40	270	97	93	93
   query41	48	50	44	44
   query42	114	95	95	95
   query43	521	471	467	467
   query44	1259	809	790	790
   query45	191	161	164	161
   query46	1122	755	734	734
   query47	1868	1770	1848	1770
   query48	451	358	364	358
   query49	1129	429	400	400
   query50	801	390	398	390
   query51	7188	6935	7001	6935
   query52	103	90	85	85
   query53	254	187	186	186
   query54	1214	466	466	466
   query55	75	77	81	77
   query56	260	255	263	255
   query57	1187	1057	1077	1057
   query58	234	284	237	237
   query59	3170	2856	2856	2856
   query60	301	267	269	267
   query61	102	118	96	96
   query62	833	650	689	650
   query63	228	186	192	186
   query64	4374	643	620	620
   query65	3251	3167	3162	3162
   query66	1184	309	297	297
   query67	16067	15629	15535	15535
   query68	3102	860	829	829
   query69	455	346	346	346
   query70	1188	1161	1150	1150
   query71	344	334	333	333
   query72	5525	3354	3398	3354
   query73	592	589	578	578
   query74	9251	9108	9041	9041
   query75	2992	2873	2891	2873
   query76	1935	873	876	873
   query77	406	382	371	371
   query78	9436	9233	9305	9233
   query79	916	866	864	864
   query80	608	579	578	578
   query81	453	261	251	251
   query82	234	228	230	228
   query83	166	163	161	161
   query84	241	112	99	99
   query85	674	361	357	357
   query86	308	325	327	325
   query87	4365	4337	4329	4329
   query88	4384	4085	4057	4057
   query89	381	360	356	356
   query90	1491	323	315	315
   query91	169	158	169	158
   query92	76	76	74	74
   query93	902	914	902	902
   query94	579	350	383	350
   query95	433	414	420	414
   query96	492	494	490	490
   query97	3103	3133	3131	3131
   query98	228	218	224	218
   query99	1405	1296	1289	1289
   Total cold run time: 288870 ms
   Total hot run time: 194718 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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2604164796

   run performance


-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2426398830

   run cloud_p0


-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2705923764

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 32853 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 5b80f6d3e35a336c82550aa9ece08e05e8348c8c, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	17640	5272	5148	5148
   q2	2057	303	166	166
   q3	10414	1265	773	773
   q4	10235	1043	557	557
   q5	7661	2410	2416	2410
   q6	205	168	136	136
   q7	905	755	630	630
   q8	9317	1357	1114	1114
   q9	5043	4710	4684	4684
   q10	6820	2325	1931	1931
   q11	491	283	269	269
   q12	358	352	216	216
   q13	17769	3691	3065	3065
   q14	237	233	217	217
   q15	535	523	468	468
   q16	626	615	600	600
   q17	595	872	350	350
   q18	6820	6458	6402	6402
   q19	2268	1000	552	552
   q20	315	338	189	189
   q21	2945	2224	2002	2002
   q22	1079	1025	974	974
   Total cold run time: 104335 ms
   Total hot run time: 32853 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	5326	5214	5238	5214
   q2	247	334	230	230
   q3	2182	2664	2294	2294
   q4	1483	1931	1381	1381
   q5	4329	4181	4196	4181
   q6	219	171	127	127
   q7	1968	1908	1777	1777
   q8	2684	2694	2632	2632
   q9	7228	7194	7204	7194
   q10	3049	3255	2769	2769
   q11	571	502	497	497
   q12	728	773	585	585
   q13	3485	4018	3252	3252
   q14	270	306	272	272
   q15	515	491	482	482
   q16	663	666	660	660
   q17	1165	1629	1327	1327
   q18	7825	7608	7599	7599
   q19	895	877	865	865
   q20	1995	2041	1895	1895
   q21	5539	4954	4769	4769
   q22	1099	1091	1039	1039
   Total cold run time: 53465 ms
   Total hot run time: 51041 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] [feature](schema) support temporary table like mysql [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2706110823

   # BE UT Coverage Report
   Increment line coverage `0.00% (0/0)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/5b80f6d3e35a336c82550aa9ece08e05e8348c8c_5b80f6d3e35a336c82550aa9ece08e05e8348c8c/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/5b80f6d3e35a336c82550aa9ece08e05e8348c8c_5b80f6d3e35a336c82550aa9ece08e05e8348c8c/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 46.86% (12533/26744) |
   | Line Coverage     | 36.44% (106824/293115) |
   | Region Coverage   | 35.49% (54570/153757) |
   | Branch Coverage   | 30.84% (27435/88972) |


-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2706300721

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 32512 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 4023ed7d094f26de95d765585f31c2abe6a75def, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	17645	5180	5096	5096
   q2	2052	300	168	168
   q3	10805	1250	736	736
   q4	10334	1068	533	533
   q5	9078	2353	2390	2353
   q6	201	166	135	135
   q7	896	768	603	603
   q8	9314	1288	1107	1107
   q9	4886	4723	4668	4668
   q10	6844	2297	1905	1905
   q11	503	279	282	279
   q12	353	354	226	226
   q13	17772	3636	3071	3071
   q14	224	232	226	226
   q15	540	495	479	479
   q16	647	619	581	581
   q17	583	866	347	347
   q18	6979	6349	6434	6349
   q19	1306	954	536	536
   q20	327	323	198	198
   q21	2757	2162	1924	1924
   q22	1093	1041	992	992
   Total cold run time: 105139 ms
   Total hot run time: 32512 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	5186	5123	5135	5123
   q2	235	333	232	232
   q3	2137	2636	2309	2309
   q4	1483	1835	1440	1440
   q5	4254	4116	4114	4114
   q6	212	163	126	126
   q7	1948	1911	1765	1765
   q8	2654	2677	2638	2638
   q9	7216	7318	7236	7236
   q10	3036	3206	2767	2767
   q11	569	507	495	495
   q12	705	745	568	568
   q13	3394	3931	3267	3267
   q14	277	300	272	272
   q15	525	467	490	467
   q16	628	691	645	645
   q17	1161	1629	1328	1328
   q18	7848	7622	7518	7518
   q19	853	833	867	833
   q20	1972	2021	1905	1905
   q21	5471	4993	4693	4693
   q22	1115	1116	1061	1061
   Total cold run time: 52879 ms
   Total hot run time: 50802 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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2359963663

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 194484 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 e97affcafd8ad06d45d0fd4f0dd50d4342f39ef4, data reload: false
   
   query1	959	375	384	375
   query2	6537	2075	2078	2075
   query3	6703	211	218	211
   query4	34622	23491	23563	23491
   query5	4360	479	464	464
   query6	267	177	169	169
   query7	4614	304	300	300
   query8	309	231	228	228
   query9	9593	2708	2701	2701
   query10	457	267	273	267
   query11	18095	15232	15370	15232
   query12	151	97	99	97
   query13	1628	428	402	402
   query14	10432	6571	6890	6571
   query15	272	176	179	176
   query16	8095	470	469	469
   query17	1663	579	556	556
   query18	2143	311	317	311
   query19	375	150	150	150
   query20	117	106	108	106
   query21	213	105	103	103
   query22	4482	4345	4341	4341
   query23	34759	33961	34106	33961
   query24	11217	2812	2871	2812
   query25	669	408	412	408
   query26	1357	165	161	161
   query27	2909	287	288	287
   query28	8568	2467	2450	2450
   query29	871	432	426	426
   query30	315	158	152	152
   query31	1036	807	860	807
   query32	106	57	59	57
   query33	781	305	298	298
   query34	945	476	502	476
   query35	897	715	748	715
   query36	1109	957	947	947
   query37	173	101	91	91
   query38	4040	3955	3866	3866
   query39	1460	1436	1403	1403
   query40	292	99	98	98
   query41	53	49	50	49
   query42	115	99	100	99
   query43	530	501	497	497
   query44	1280	819	800	800
   query45	193	164	164	164
   query46	1133	776	766	766
   query47	1917	1819	1826	1819
   query48	461	358	363	358
   query49	1159	416	406	406
   query50	812	405	417	405
   query51	7008	6805	6949	6805
   query52	102	85	91	85
   query53	254	184	188	184
   query54	1307	469	477	469
   query55	83	80	79	79
   query56	290	275	261	261
   query57	1225	1103	1118	1103
   query58	256	256	229	229
   query59	3128	3063	2963	2963
   query60	291	260	257	257
   query61	103	101	103	101
   query62	862	665	666	665
   query63	223	185	182	182
   query64	5317	637	613	613
   query65	3283	3178	3188	3178
   query66	1434	301	305	301
   query67	16229	15548	15566	15548
   query68	3105	877	866	866
   query69	448	333	343	333
   query70	1207	1168	1191	1168
   query71	337	333	336	333
   query72	5955	3368	3514	3368
   query73	592	587	578	578
   query74	9555	9030	8959	8959
   query75	3097	2915	2907	2907
   query76	1913	863	861	861
   query77	381	364	369	364
   query78	9454	9264	9177	9177
   query79	936	907	878	878
   query80	607	587	572	572
   query81	449	254	260	254
   query82	232	228	235	228
   query83	158	156	156	156
   query84	248	96	108	96
   query85	673	362	364	362
   query86	324	316	296	296
   query87	4301	4324	4360	4324
   query88	4623	4086	4091	4086
   query89	372	367	370	367
   query90	1451	314	309	309
   query91	159	159	161	159
   query92	78	69	70	69
   query93	926	919	908	908
   query94	565	365	373	365
   query95	424	409	420	409
   query96	484	491	488	488
   query97	3137	3126	3124	3124
   query98	221	236	220	220
   query99	1388	1304	1316	1304
   Total cold run time: 294439 ms
   Total hot run time: 194484 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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2563583170

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 31.67 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 78a93210171a3a3267ccedc083bb36ac6dd0dcf8, data reload: false
   
   query1	0.04	0.03	0.03
   query2	0.09	0.04	0.04
   query3	0.23	0.05	0.05
   query4	1.65	0.08	0.09
   query5	0.43	0.41	0.41
   query6	1.15	0.66	0.65
   query7	0.02	0.02	0.02
   query8	0.05	0.04	0.04
   query9	0.55	0.50	0.49
   query10	0.55	0.56	0.55
   query11	0.17	0.12	0.12
   query12	0.16	0.13	0.13
   query13	0.61	0.61	0.60
   query14	2.83	2.74	2.83
   query15	0.92	0.84	0.84
   query16	0.38	0.36	0.38
   query17	1.09	1.05	1.06
   query18	0.19	0.18	0.18
   query19	1.95	2.01	1.87
   query20	0.02	0.01	0.01
   query21	15.35	0.96	0.67
   query22	0.76	0.77	0.69
   query23	15.03	1.55	0.69
   query24	2.22	0.36	0.23
   query25	0.13	0.08	0.09
   query26	0.30	0.18	0.18
   query27	0.09	0.07	0.07
   query28	13.42	1.83	1.11
   query29	12.61	4.11	3.47
   query30	0.24	0.08	0.07
   query31	2.84	0.60	0.40
   query32	3.23	0.58	0.48
   query33	3.16	3.07	3.07
   query34	16.72	5.16	4.56
   query35	4.55	4.57	4.53
   query36	0.62	0.48	0.50
   query37	0.21	0.17	0.17
   query38	0.16	0.15	0.15
   query39	0.05	0.05	0.04
   query40	0.17	0.13	0.12
   query41	0.10	0.06	0.06
   query42	0.06	0.05	0.05
   query43	0.05	0.05	0.04
   Total cold run time: 105.15 s
   Total hot run time: 31.67 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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2564157047

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2564164983

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 196706 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 a2d642a6ec8d0d1fa0787e08f47b5a0263a17789, data reload: false
   
   query1	1288	974	946	946
   query2	6497	2408	2256	2256
   query3	10955	4751	4852	4751
   query4	33186	23609	25782	23609
   query5	4118	661	451	451
   query6	278	204	185	185
   query7	3989	477	294	294
   query8	298	233	223	223
   query9	9583	2772	2748	2748
   query10	459	313	242	242
   query11	17689	15420	15272	15272
   query12	169	109	112	109
   query13	1577	555	401	401
   query14	10532	6834	7784	6834
   query15	230	204	191	191
   query16	7979	646	464	464
   query17	1545	799	610	610
   query18	2081	422	330	330
   query19	227	197	170	170
   query20	133	118	117	117
   query21	204	131	110	110
   query22	4672	4480	4522	4480
   query23	34456	33715	34286	33715
   query24	6561	2401	2318	2318
   query25	441	453	402	402
   query26	866	272	155	155
   query27	2235	481	340	340
   query28	5641	2501	2458	2458
   query29	586	605	454	454
   query30	216	186	158	158
   query31	1010	921	884	884
   query32	71	61	58	58
   query33	475	347	329	329
   query34	747	883	529	529
   query35	815	831	741	741
   query36	1029	1036	984	984
   query37	121	106	73	73
   query38	4232	4230	4100	4100
   query39	1564	1442	1456	1442
   query40	217	124	114	114
   query41	43	45	44	44
   query42	122	102	104	102
   query43	530	552	508	508
   query44	1398	848	862	848
   query45	190	178	164	164
   query46	894	1039	662	662
   query47	2025	2014	1891	1891
   query48	389	417	330	330
   query49	723	476	417	417
   query50	654	682	411	411
   query51	7386	7295	7099	7099
   query52	106	105	92	92
   query53	225	252	188	188
   query54	493	535	432	432
   query55	84	83	78	78
   query56	265	257	252	252
   query57	1218	1226	1156	1156
   query58	245	224	227	224
   query59	3242	3447	3171	3171
   query60	277	269	259	259
   query61	109	106	115	106
   query62	867	834	748	748
   query63	233	194	201	194
   query64	2999	1086	661	661
   query65	3324	3277	3249	3249
   query66	862	406	306	306
   query67	16411	15930	15537	15537
   query68	9388	755	524	524
   query69	487	304	251	251
   query70	1228	1131	1162	1131
   query71	432	286	243	243
   query72	5909	3944	3849	3849
   query73	822	752	351	351
   query74	9954	9272	8837	8837
   query75	4579	3160	2653	2653
   query76	5576	1193	784	784
   query77	1027	370	291	291
   query78	10757	10218	9523	9523
   query79	3324	890	588	588
   query80	760	523	441	441
   query81	478	270	237	237
   query82	230	158	132	132
   query83	201	178	143	143
   query84	282	92	73	73
   query85	756	346	304	304
   query86	350	298	313	298
   query87	4571	4593	4291	4291
   query88	3600	2263	2224	2224
   query89	437	323	297	297
   query90	2067	184	189	184
   query91	129	138	105	105
   query92	66	57	53	53
   query93	1427	798	530	530
   query94	674	405	297	297
   query95	334	272	254	254
   query96	500	617	283	283
   query97	2772	2804	2682	2682
   query98	218	206	204	204
   query99	1666	1607	1473	1473
   Total cold run time: 299287 ms
   Total hot run time: 196706 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] [feature](schema) support temporary table like mysql [doris]

Posted by "Jibing-Li (via GitHub)" <gi...@apache.org>.
Jibing-Li commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1949131141


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java:
##########
@@ -304,11 +308,23 @@ private void sendJobId(List<AnalysisInfo> analysisInfos, boolean proxy) {
             row.add(databaseIf.isPresent() ? databaseIf.get().getFullName() : "DB may get deleted");
             if (databaseIf.isPresent()) {
                 Optional<? extends TableIf> table = databaseIf.get().getTable(analysisInfo.tblId);
-                row.add(table.isPresent() ? table.get().getName() : "Table may get deleted");
+                row.add(table.isPresent() ? Util.getTempTableDisplayName(table.get().getName())

Review Comment:
   Why do we need to do this and the following about newColNames if we skip analyzing temp table?



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "morrySnow (via GitHub)" <gi...@apache.org>.
morrySnow commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1948879175


##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -185,6 +198,9 @@ supportedCreateStatement
     | CREATE (EXTERNAL)? TABLE (IF NOT EXISTS)? name=multipartIdentifier
         LIKE existedTable=multipartIdentifier
         (WITH ROLLUP (rollupNames=identifierList)?)?                      #createTableLike
+    | CREATE (TEMPORARY)? TABLE (IF NOT EXISTS)? name=multipartIdentifier

Review Comment:
   same as create table



##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -177,6 +177,19 @@ supportedCreateStatement
         properties=propertyClause?
         (BROKER extProperties=propertyClause)?
         (AS query)?                                                       #createTable
+    | CREATE (TEMPORARY)? TABLE (IF NOT EXISTS)? name=multipartIdentifier

Review Comment:
   remove this new branch
   ```
   (EXTERNAL | TEMPORARY)?
   ```



##########
fe/fe-core/src/main/java/org/apache/doris/binlog/BinlogManager.java:
##########
@@ -154,7 +154,11 @@ private void addBinlog(long dbId, List<Long> tableIds, long commitSeq, long time
         if (tableIds != null) {
             for (long tableId : tableIds) {
                 boolean tableBinlogEnable = binlogConfigCache.isEnableTable(dbId, tableId);
-                anyEnable = anyEnable || tableBinlogEnable;
+                if (tableIds.size() > 1) {
+                    anyEnable = anyEnable || tableBinlogEnable;
+                } else {
+                    anyEnable = tableBinlogEnable;
+                }

Review Comment:
   i think this is code of temporary table, it is better to submit another PR to solve this problem



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/DatabaseIf.java:
##########
@@ -167,6 +183,17 @@ default T getTableOrMetaException(String tableName, TableIf.TableType tableType)
         return table;
     }
 
+    default T getNonTempTableOrMetaException(String tableName, TableIf.TableType tableType)
+            throws MetaNotFoundException {
+        T table = getNonTempTableOrMetaException(tableName);
+        TableType type = Objects.requireNonNull(table.getType());

Review Comment:
   add error message



##########
fe/fe-core/src/main/java/org/apache/doris/backup/BackupHandler.java:
##########
@@ -435,14 +436,27 @@ private void backup(Repository repository, Database db, BackupStmt stmt) throws
                 if (Config.ignore_backup_not_support_table_type) {
                     LOG.warn("Table '{}' is a {} table, can not backup and ignore it."
                             + "Only OLAP(Doris)/ODBC/VIEW table can be backed up",
-                            tblName, tbl.getType().toString());
+                            tblName, tbl.isTemporary() ? "temporary" : tbl.getType().toString());
                     tblRefsNotSupport.add(tblRef);
                     continue;
                 } else {
                     ErrorReport.reportDdlException(ErrorCode.ERR_NOT_OLAP_TABLE, tblName);
                 }
             }
 
+            if (tbl.isTemporary()) {
+                if (Config.ignore_backup_not_support_table_type) {
+                    LOG.warn("Table '{}' is a temporary table, can not backup and ignore it."
+                            + "Only OLAP(Doris)/ODBC/VIEW table can be backed up",
+                            Util.getTempTableDisplayName(tblName));
+                    tblRefsNotSupport.add(tblRef);
+                    continue;
+                } else {
+                    ErrorReport.reportDdlException("Table " + Util.getTempTableDisplayName(tblName)

Review Comment:
   i think backup should always ignore temporary table and should not failed even if has temporary table in current Cluster



##########
fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java:
##########
@@ -127,7 +127,7 @@ public void processCreateMaterializedView(CreateMaterializedViewStmt stmt)
         Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(dbName);
         Env.getCurrentInternalCatalog().checkAvailableCapacity(db);
 
-        OlapTable olapTable = (OlapTable) db.getTableOrMetaException(tableName, TableType.OLAP);
+        OlapTable olapTable = (OlapTable) db.getNonTempTableOrMetaException(tableName, TableType.OLAP);

Review Comment:
   why temporary table could not create materialized view?



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java:
##########
@@ -381,6 +382,19 @@ public void checkQuota() throws DdlException {
         checkReplicaQuota();
     }
 
+    public boolean isTableExist(String tableName, boolean isTemporary) {
+        if (Env.isTableNamesCaseInsensitive()) {
+            tableName = tableName.toLowerCase();
+        }
+
+        if (isTemporary) {
+            Set<String> tableSet = ConnectContext.get().getDbToTempTableNamesMap().get(fullQualifiedName);
+            return tableSet != null && tableSet.contains(tableName);
+        } else {
+            return nameToTable.containsKey(tableName);
+        }
+    }
+
     public boolean isTableExist(String tableName) {

Review Comment:
   should call `isTableExist(String tableName, boolean isTemporary)` with false as second parameter



##########
fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java:
##########
@@ -127,7 +127,7 @@ public void processCreateMaterializedView(CreateMaterializedViewStmt stmt)
         Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(dbName);
         Env.getCurrentInternalCatalog().checkAvailableCapacity(db);
 
-        OlapTable olapTable = (OlapTable) db.getTableOrMetaException(tableName, TableType.OLAP);
+        OlapTable olapTable = (OlapTable) db.getNonTempTableOrMetaException(tableName, TableType.OLAP);

Review Comment:
   if not support create sync materialized view on temporary table, we should also forbid create async materialized view on it



##########
fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java:
##########
@@ -206,6 +207,9 @@ public List<AnalysisInfo> buildAnalysisInfosForDB(DatabaseIf<TableIf> db, Analyz
                 if (table instanceof View) {
                     continue;
                 }
+                if (table.isTemporary()) {

Review Comment:
   not analyze temporary table maybe not a good idea



##########
fe/fe-core/src/main/java/org/apache/doris/policy/PolicyMgr.java:
##########
@@ -179,12 +180,16 @@ public void dropPolicy(DropPolicyLog dropPolicyLog, boolean ifExists) throws Ddl
                 for (Table table : tables) {
                     if (table instanceof OlapTable) {
                         OlapTable olapTable = (OlapTable) table;
+                        String tableName = table.getName();
+                        if (table.isTemporary()) {
+                            tableName = Util.getTempTableDisplayName(tableName);
+                        }

Review Comment:
   why not Util provide add new function to process Table object and return right name



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java:
##########
@@ -381,6 +382,19 @@ public void checkQuota() throws DdlException {
         checkReplicaQuota();
     }
 
+    public boolean isTableExist(String tableName, boolean isTemporary) {
+        if (Env.isTableNamesCaseInsensitive()) {
+            tableName = tableName.toLowerCase();

Review Comment:
   this is different with original `isTableExist`
   ```
           if (Env.isTableNamesCaseInsensitive()) {
               tableName = lowerCaseToTableName.get(tableName.toLowerCase());
               if (tableName == null) {
                   return false;
               }
           }
   ```



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java:
##########
@@ -569,7 +589,33 @@ public Table getTableNullable(String tableName) {
                 return null;
             }
         }
-        return nameToTable.get(tableName);
+
+        // return temp table first
+        Table table = nameToTable.get(Util.generateTempTableInnerName(tableName));

Review Comment:
   so temporary table's name could same with permanent table?



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowPartitionIdCommand.java:
##########
@@ -84,13 +90,22 @@ private ShowResultSet handleShowPartitionId(ConnectContext ctx, StmtExecutor exe
                         if (partition != null) {
                             List<String> row = new ArrayList<>();
                             row.add(database.getFullName());
-                            row.add(tbl.getName());
+                            if (tbl.isTemporary()) {
+                                if (!Util.isTempTableInCurrentSession(tbl.getName())) {
+                                    continue;
+                                }
+                                row.add(Util.getTempTableDisplayName(tbl.getName()));

Review Comment:
   could table provide a function to return display name directly?



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1975321253


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java:
##########
@@ -206,6 +207,9 @@ public List<AnalysisInfo> buildAnalysisInfosForDB(DatabaseIf<TableIf> db, Analyz
                 if (table instanceof View) {
                     continue;
                 }
+                if (table.isTemporary()) {

Review Comment:
   done



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1983242239


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java:
##########
@@ -304,11 +308,23 @@ private void sendJobId(List<AnalysisInfo> analysisInfos, boolean proxy) {
             row.add(databaseIf.isPresent() ? databaseIf.get().getFullName() : "DB may get deleted");
             if (databaseIf.isPresent()) {
                 Optional<? extends TableIf> table = databaseIf.get().getTable(analysisInfo.tblId);
-                row.add(table.isPresent() ? table.get().getName() : "Table may get deleted");
+                row.add(table.isPresent() ? Util.getTempTableDisplayName(table.get().getName())

Review Comment:
   will allow analyze temporary table



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2426478027

   run cloud_p0


-- 
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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2343073774

   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)
   
   Since 2024-03-18, the Document has been moved to [doris-website](https://github.com/apache/doris-website).
   See [Doris Document](https://cwiki.apache.org/confluence/display/DORIS/Doris+Document).


-- 
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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2357483970

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 41574 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 aca156b6053792865f2c476c9e4de21a496c41b3, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	18262	7466	7379	7379
   q2	2980	159	169	159
   q3	11362	1149	1176	1149
   q4	10637	826	726	726
   q5	8007	3118	3108	3108
   q6	241	152	151	151
   q7	1012	618	601	601
   q8	9809	2002	2046	2002
   q9	6819	6370	6402	6370
   q10	6996	2252	2280	2252
   q11	437	243	249	243
   q12	407	219	214	214
   q13	17781	3012	2987	2987
   q14	242	216	216	216
   q15	573	526	528	526
   q16	661	605	610	605
   q17	975	793	767	767
   q18	7204	6738	6669	6669
   q19	1399	1005	1018	1005
   q20	584	302	280	280
   q21	3905	3212	3173	3173
   q22	1112	996	992	992
   Total cold run time: 111405 ms
   Total hot run time: 41574 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	7273	7282	7272	7272
   q2	324	221	226	221
   q3	2883	2787	2769	2769
   q4	1948	1703	1651	1651
   q5	5355	5383	5404	5383
   q6	225	139	142	139
   q7	2066	1707	1727	1707
   q8	3161	3310	3322	3310
   q9	8342	8421	8351	8351
   q10	3372	3359	3335	3335
   q11	574	468	473	468
   q12	772	571	586	571
   q13	7432	2977	3006	2977
   q14	289	265	253	253
   q15	559	517	507	507
   q16	706	664	697	664
   q17	1764	1553	1537	1537
   q18	7745	7228	7377	7228
   q19	1658	1624	1496	1496
   q20	2054	1829	1797	1797
   q21	5374	5120	5068	5068
   q22	1109	1033	1017	1017
   Total cold run time: 64985 ms
   Total hot run time: 57721 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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2343232637

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 31.41 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 e5c93fb7d5c8306fff4f1cfadc5f3ca7ecc61a04, data reload: false
   
   query1	0.05	0.05	0.04
   query2	0.08	0.04	0.04
   query3	0.22	0.05	0.05
   query4	1.67	0.08	0.07
   query5	0.52	0.50	0.50
   query6	1.13	0.72	0.72
   query7	0.02	0.01	0.01
   query8	0.05	0.04	0.05
   query9	0.54	0.50	0.50
   query10	0.55	0.56	0.55
   query11	0.15	0.12	0.11
   query12	0.14	0.12	0.12
   query13	0.60	0.59	0.59
   query14	1.41	1.42	1.48
   query15	0.84	0.83	0.83
   query16	0.38	0.37	0.36
   query17	1.07	1.03	0.99
   query18	0.21	0.19	0.20
   query19	1.93	1.84	1.71
   query20	0.01	0.01	0.01
   query21	15.41	0.68	0.68
   query22	4.08	6.96	1.83
   query23	18.28	1.57	1.36
   query24	2.09	0.23	0.22
   query25	0.14	0.09	0.08
   query26	0.28	0.19	0.18
   query27	0.07	0.08	0.07
   query28	13.31	1.04	1.01
   query29	12.64	3.36	3.27
   query30	0.24	0.05	0.05
   query31	2.87	0.39	0.40
   query32	3.26	0.50	0.48
   query33	2.96	3.05	3.02
   query34	17.05	4.41	4.48
   query35	4.51	4.56	4.46
   query36	0.66	0.50	0.47
   query37	0.18	0.16	0.16
   query38	0.16	0.15	0.14
   query39	0.05	0.03	0.03
   query40	0.15	0.14	0.13
   query41	0.10	0.04	0.05
   query42	0.06	0.04	0.05
   query43	0.05	0.04	0.04
   Total cold run time: 110.17 s
   Total hot run time: 31.41 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] [feature](schema) support temporary table like mysql [doris]

Posted by "dataroaring (via GitHub)" <gi...@apache.org>.
dataroaring merged PR #40680:
URL: https://github.com/apache/doris/pull/40680


-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1971210290


##########
fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java:
##########
@@ -127,7 +127,7 @@ public void processCreateMaterializedView(CreateMaterializedViewStmt stmt)
         Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(dbName);
         Env.getCurrentInternalCatalog().checkAvailableCapacity(db);
 
-        OlapTable olapTable = (OlapTable) db.getTableOrMetaException(tableName, TableType.OLAP);
+        OlapTable olapTable = (OlapTable) db.getNonTempTableOrMetaException(tableName, TableType.OLAP);

Review Comment:
   will implement it in pr later



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2705729815

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2705949537

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 191579 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 5b80f6d3e35a336c82550aa9ece08e05e8348c8c, data reload: false
   
   query1	1387	1012	1014	1012
   query2	6262	2002	1961	1961
   query3	11079	4592	4521	4521
   query4	53773	25328	23461	23461
   query5	5280	561	510	510
   query6	366	218	194	194
   query7	4925	509	294	294
   query8	315	256	236	236
   query9	6020	2514	2527	2514
   query10	436	308	259	259
   query11	15237	15383	14769	14769
   query12	160	116	107	107
   query13	1107	503	401	401
   query14	10367	6147	6414	6147
   query15	215	191	184	184
   query16	7133	654	483	483
   query17	1086	728	579	579
   query18	1559	420	327	327
   query19	202	195	169	169
   query20	140	133	121	121
   query21	214	125	107	107
   query22	4597	4472	4514	4472
   query23	33885	33325	33190	33190
   query24	5982	2434	2452	2434
   query25	440	464	393	393
   query26	764	273	149	149
   query27	2224	485	331	331
   query28	2796	2457	2464	2457
   query29	594	574	452	452
   query30	272	224	193	193
   query31	894	873	802	802
   query32	75	60	66	60
   query33	468	366	310	310
   query34	755	830	512	512
   query35	805	857	742	742
   query36	949	1012	909	909
   query37	129	104	72	72
   query38	4086	4263	4142	4142
   query39	1487	1466	1459	1459
   query40	217	115	104	104
   query41	55	52	50	50
   query42	125	118	107	107
   query43	497	534	495	495
   query44	1313	811	799	799
   query45	184	175	170	170
   query46	854	1034	644	644
   query47	1887	1908	1804	1804
   query48	377	421	312	312
   query49	705	509	424	424
   query50	718	780	441	441
   query51	4336	4295	4238	4238
   query52	106	106	92	92
   query53	229	268	193	193
   query54	503	496	420	420
   query55	84	84	83	83
   query56	304	296	268	268
   query57	1152	1198	1129	1129
   query58	292	240	233	233
   query59	2852	2831	2904	2831
   query60	326	276	269	269
   query61	119	115	123	115
   query62	756	759	688	688
   query63	236	196	189	189
   query64	2053	1038	683	683
   query65	4517	4431	4462	4431
   query66	762	393	296	296
   query67	15709	15849	15193	15193
   query68	7202	877	506	506
   query69	525	293	261	261
   query70	1134	1052	1056	1052
   query71	488	304	248	248
   query72	5746	3560	3762	3560
   query73	1248	729	342	342
   query74	8971	9218	8996	8996
   query75	3760	3161	2688	2688
   query76	4160	1184	766	766
   query77	631	362	267	267
   query78	10115	10107	9238	9238
   query79	2965	828	579	579
   query80	715	511	442	442
   query81	497	259	224	224
   query82	477	122	100	100
   query83	290	184	154	154
   query84	287	85	78	78
   query85	883	346	303	303
   query86	396	289	299	289
   query87	4483	4493	4299	4299
   query88	3407	2222	2198	2198
   query89	412	309	282	282
   query90	1766	205	214	205
   query91	143	181	112	112
   query92	75	62	54	54
   query93	2306	1073	583	583
   query94	654	409	297	297
   query95	347	270	258	258
   query96	492	576	271	271
   query97	3381	3328	3312	3312
   query98	230	201	201	201
   query99	1456	1382	1278	1278
   Total cold run time: 299375 ms
   Total hot run time: 191579 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] [feature](schema) support temporary table like mysql [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2706397087

   # BE UT Coverage Report
   Increment line coverage `0.00% (0/0)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/4023ed7d094f26de95d765585f31c2abe6a75def_4023ed7d094f26de95d765585f31c2abe6a75def/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/4023ed7d094f26de95d765585f31c2abe6a75def_4023ed7d094f26de95d765585f31c2abe6a75def/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 46.86% (12533/26744) |
   | Line Coverage     | 36.45% (106854/293115) |
   | Region Coverage   | 35.49% (54563/153757) |
   | Branch Coverage   | 30.84% (27439/88972) |


-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2563745432

   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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2343189902

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 38424 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 e5c93fb7d5c8306fff4f1cfadc5f3ca7ecc61a04, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	18006	4717	4415	4415
   q2	2596	196	187	187
   q3	11662	1203	1164	1164
   q4	11287	830	792	792
   q5	7843	2888	2827	2827
   q6	226	138	139	138
   q7	958	626	598	598
   q8	9341	2041	2054	2041
   q9	7383	6591	6596	6591
   q10	7016	2320	2235	2235
   q11	454	241	253	241
   q12	415	229	225	225
   q13	17772	3068	3078	3068
   q14	283	231	250	231
   q15	549	508	482	482
   q16	528	432	419	419
   q17	986	640	735	640
   q18	7279	6784	6953	6784
   q19	1414	927	1048	927
   q20	669	328	331	328
   q21	3864	3131	3056	3056
   q22	1134	1035	1049	1035
   Total cold run time: 111665 ms
   Total hot run time: 38424 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	4397	4307	4322	4307
   q2	374	274	258	258
   q3	2916	2728	2649	2649
   q4	2012	1766	1713	1713
   q5	5431	5457	5410	5410
   q6	217	133	136	133
   q7	2124	1711	1802	1711
   q8	3247	3364	3378	3364
   q9	8489	8450	8461	8450
   q10	3475	3209	3207	3207
   q11	627	496	493	493
   q12	786	604	643	604
   q13	14471	3101	3102	3101
   q14	309	273	285	273
   q15	532	491	487	487
   q16	521	483	459	459
   q17	1797	1501	1490	1490
   q18	7822	7522	7456	7456
   q19	1701	1388	1491	1388
   q20	2059	1832	1831	1831
   q21	5603	5366	5434	5366
   q22	1126	1067	1028	1028
   Total cold run time: 70036 ms
   Total hot run time: 55178 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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2406891207

   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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2360637501

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 190489 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 8a7f49edf83295e5384354cfefc52f54571482cc, data reload: false
   
   query1	940	376	396	376
   query2	6557	2024	1997	1997
   query3	6710	212	227	212
   query4	34350	23436	23556	23436
   query5	4525	462	469	462
   query6	273	168	165	165
   query7	4634	304	309	304
   query8	297	230	236	230
   query9	9754	2664	2645	2645
   query10	484	285	280	280
   query11	18124	15206	15372	15206
   query12	145	95	99	95
   query13	1642	436	403	403
   query14	11476	6947	7325	6947
   query15	254	172	176	172
   query16	7984	458	469	458
   query17	1646	571	558	558
   query18	2140	309	319	309
   query19	365	156	152	152
   query20	116	103	108	103
   query21	216	106	104	104
   query22	4603	4095	4394	4095
   query23	34762	34205	33943	33943
   query24	11194	3028	2917	2917
   query25	649	408	426	408
   query26	1387	162	166	162
   query27	2862	296	285	285
   query28	8219	2446	2443	2443
   query29	926	423	435	423
   query30	320	164	156	156
   query31	1028	800	840	800
   query32	105	61	69	61
   query33	808	306	301	301
   query34	934	496	508	496
   query35	858	755	723	723
   query36	1101	971	954	954
   query37	167	100	94	94
   query38	3985	4026	3889	3889
   query39	1478	1453	1394	1394
   query40	286	99	100	99
   query41	53	48	52	48
   query42	119	102	102	102
   query43	528	486	479	479
   query44	1279	838	799	799
   query45	199	164	172	164
   query46	1153	759	740	740
   query47	1914	1816	1826	1816
   query48	495	376	368	368
   query49	1159	409	408	408
   query50	821	411	424	411
   query51	7131	6923	6812	6812
   query52	99	88	87	87
   query53	271	195	187	187
   query54	1336	479	497	479
   query55	83	78	79	78
   query56	294	266	265	265
   query57	1210	1113	1066	1066
   query58	266	226	233	226
   query59	3232	3070	2889	2889
   query60	305	276	259	259
   query61	105	97	102	97
   query62	851	638	666	638
   query63	221	189	186	186
   query64	5246	634	626	626
   query65	3268	3172	3186	3172
   query66	1426	291	328	291
   query67	15967	15645	15401	15401
   query68	4906	583	595	583
   query69	457	302	297	297
   query70	1152	1161	1063	1063
   query71	340	267	278	267
   query72	6401	4077	4049	4049
   query73	785	332	339	332
   query74	10024	9042	9011	9011
   query75	3374	2630	2659	2630
   query76	3114	933	956	933
   query77	433	300	296	296
   query78	9895	9242	9182	9182
   query79	1785	555	571	555
   query80	1219	457	449	449
   query81	544	245	245	245
   query82	924	149	143	143
   query83	219	136	135	135
   query84	247	83	84	83
   query85	1274	294	279	279
   query86	352	313	309	309
   query87	4531	4326	4472	4326
   query88	3304	2373	2366	2366
   query89	389	289	290	289
   query90	1878	189	191	189
   query91	177	140	143	140
   query92	62	48	47	47
   query93	1319	548	546	546
   query94	837	293	295	293
   query95	351	257	257	257
   query96	614	285	277	277
   query97	3213	3060	3106	3060
   query98	221	200	198	198
   query99	1538	1309	1319	1309
   Total cold run time: 303214 ms
   Total hot run time: 190489 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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2360648212

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 32.92 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 8a7f49edf83295e5384354cfefc52f54571482cc, data reload: false
   
   query1	0.05	0.05	0.04
   query2	0.06	0.03	0.02
   query3	0.22	0.06	0.06
   query4	1.65	0.10	0.10
   query5	0.52	0.49	0.52
   query6	1.15	0.71	0.72
   query7	0.02	0.01	0.01
   query8	0.04	0.03	0.03
   query9	0.57	0.50	0.48
   query10	0.54	0.54	0.56
   query11	0.15	0.11	0.10
   query12	0.13	0.11	0.11
   query13	0.60	0.60	0.59
   query14	2.95	3.02	2.97
   query15	0.88	0.82	0.82
   query16	0.39	0.37	0.39
   query17	1.07	1.08	1.07
   query18	0.21	0.20	0.21
   query19	1.97	1.84	2.01
   query20	0.01	0.01	0.01
   query21	15.35	0.63	0.59
   query22	2.95	2.11	1.71
   query23	17.23	0.97	0.79
   query24	2.50	1.36	1.19
   query25	0.37	0.13	0.07
   query26	0.35	0.14	0.14
   query27	0.04	0.03	0.05
   query28	10.73	1.10	1.06
   query29	12.54	3.31	3.36
   query30	0.25	0.05	0.05
   query31	2.90	0.38	0.38
   query32	3.29	0.46	0.46
   query33	3.00	2.99	3.02
   query34	16.88	4.44	4.40
   query35	4.38	4.51	4.42
   query36	0.68	0.49	0.50
   query37	0.09	0.06	0.05
   query38	0.04	0.04	0.03
   query39	0.03	0.02	0.02
   query40	0.15	0.13	0.12
   query41	0.08	0.02	0.02
   query42	0.04	0.02	0.02
   query43	0.03	0.02	0.02
   Total cold run time: 107.08 s
   Total hot run time: 32.92 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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2425584638

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2604357190

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 194158 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 a67688672ceec85887fd2b7ad0e7edce3c29e316, data reload: false
   
   query1	1314	970	940	940
   query2	6324	2030	1998	1998
   query3	10969	4381	4327	4327
   query4	60696	32037	23074	23074
   query5	5100	625	474	474
   query6	442	195	188	188
   query7	5574	520	304	304
   query8	330	251	222	222
   query9	8154	2600	2614	2600
   query10	437	329	261	261
   query11	16073	15085	15228	15085
   query12	165	112	113	112
   query13	1458	547	430	430
   query14	11518	7504	6934	6934
   query15	210	195	193	193
   query16	7212	635	496	496
   query17	1097	789	594	594
   query18	1897	422	309	309
   query19	186	182	160	160
   query20	113	109	113	109
   query21	222	120	101	101
   query22	4576	4512	4488	4488
   query23	33807	33522	33281	33281
   query24	5552	2342	2416	2342
   query25	481	480	396	396
   query26	645	269	151	151
   query27	1744	486	341	341
   query28	4237	2485	2420	2420
   query29	533	569	438	438
   query30	216	198	161	161
   query31	948	870	832	832
   query32	72	60	58	58
   query33	412	370	307	307
   query34	747	858	521	521
   query35	792	840	831	831
   query36	1054	1067	980	980
   query37	122	128	72	72
   query38	4296	4305	4186	4186
   query39	1526	1501	1429	1429
   query40	206	112	104	104
   query41	62	50	50	50
   query42	113	103	107	103
   query43	548	526	485	485
   query44	1309	821	818	818
   query45	185	172	165	165
   query46	915	1087	669	669
   query47	1913	1912	1848	1848
   query48	385	398	334	334
   query49	740	485	392	392
   query50	648	689	420	420
   query51	7013	7030	6890	6890
   query52	100	104	100	100
   query53	222	252	184	184
   query54	476	529	431	431
   query55	84	84	79	79
   query56	277	263	260	260
   query57	1219	1150	1115	1115
   query58	240	234	232	232
   query59	2998	3152	2952	2952
   query60	272	268	256	256
   query61	112	110	113	110
   query62	724	705	653	653
   query63	218	188	192	188
   query64	1336	1040	659	659
   query65	3270	3156	3135	3135
   query66	678	401	291	291
   query67	16060	15888	15557	15557
   query68	5315	829	526	526
   query69	487	296	268	268
   query70	1231	1152	1121	1121
   query71	409	282	272	272
   query72	6361	3920	3909	3909
   query73	789	755	360	360
   query74	10053	9171	8590	8590
   query75	3188	3154	2697	2697
   query76	3814	1149	779	779
   query77	476	359	277	277
   query78	10130	10148	9706	9706
   query79	2843	809	600	600
   query80	1752	540	448	448
   query81	552	287	233	233
   query82	360	148	119	119
   query83	316	163	150	150
   query84	289	85	71	71
   query85	789	353	308	308
   query86	429	305	301	301
   query87	4341	4466	4394	4394
   query88	3520	2222	2153	2153
   query89	407	326	296	296
   query90	1606	187	192	187
   query91	130	158	105	105
   query92	65	56	51	51
   query93	2073	879	530	530
   query94	766	445	309	309
   query95	332	268	264	264
   query96	475	611	287	287
   query97	2831	2838	2769	2769
   query98	218	212	194	194
   query99	1329	1384	1259	1259
   Total cold run time: 311250 ms
   Total hot run time: 194158 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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1971207968


##########
fe/fe-core/src/main/java/org/apache/doris/binlog/BinlogManager.java:
##########
@@ -154,7 +154,11 @@ private void addBinlog(long dbId, List<Long> tableIds, long commitSeq, long time
         if (tableIds != null) {
             for (long tableId : tableIds) {
                 boolean tableBinlogEnable = binlogConfigCache.isEnableTable(dbId, tableId);
-                anyEnable = anyEnable || tableBinlogEnable;
+                if (tableIds.size() > 1) {
+                    anyEnable = anyEnable || tableBinlogEnable;
+                } else {
+                    anyEnable = tableBinlogEnable;
+                }

Review Comment:
   this code is used to ignore generating binlog for temporary table, coz temporary table always has binlog.enable = false



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1974891643


##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -177,6 +177,19 @@ supportedCreateStatement
         properties=propertyClause?
         (BROKER extProperties=propertyClause)?
         (AS query)?                                                       #createTable
+    | CREATE (TEMPORARY)? TABLE (IF NOT EXISTS)? name=multipartIdentifier

Review Comment:
   done



##########
fe/fe-core/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -185,6 +198,9 @@ supportedCreateStatement
     | CREATE (EXTERNAL)? TABLE (IF NOT EXISTS)? name=multipartIdentifier
         LIKE existedTable=multipartIdentifier
         (WITH ROLLUP (rollupNames=identifierList)?)?                      #createTableLike
+    | CREATE (TEMPORARY)? TABLE (IF NOT EXISTS)? name=multipartIdentifier

Review Comment:
   done



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1975314869


##########
fe/fe-core/src/main/java/org/apache/doris/policy/PolicyMgr.java:
##########
@@ -179,12 +180,16 @@ public void dropPolicy(DropPolicyLog dropPolicyLog, boolean ifExists) throws Ddl
                 for (Table table : tables) {
                     if (table instanceof OlapTable) {
                         OlapTable olapTable = (OlapTable) table;
+                        String tableName = table.getName();
+                        if (table.isTemporary()) {
+                            tableName = Util.getTempTableDisplayName(tableName);
+                        }

Review Comment:
   coz sometimes only have tablename with string type. refactor this code



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2706324143

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 192228 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 4023ed7d094f26de95d765585f31c2abe6a75def, data reload: false
   
   query1	1380	988	983	983
   query2	6259	1983	1916	1916
   query3	11122	4626	4705	4626
   query4	55060	25943	23336	23336
   query5	5064	630	486	486
   query6	337	215	209	209
   query7	4876	531	294	294
   query8	330	249	242	242
   query9	5521	2534	2550	2534
   query10	422	326	259	259
   query11	15076	15115	14805	14805
   query12	159	111	110	110
   query13	1038	509	401	401
   query14	10669	6984	6334	6334
   query15	212	208	198	198
   query16	7132	647	471	471
   query17	1088	768	598	598
   query18	1530	410	323	323
   query19	221	201	172	172
   query20	131	136	127	127
   query21	209	126	107	107
   query22	4548	4592	4336	4336
   query23	33878	33388	33359	33359
   query24	5719	2421	2434	2421
   query25	454	475	405	405
   query26	706	275	153	153
   query27	1845	493	350	350
   query28	2883	2470	2444	2444
   query29	587	587	448	448
   query30	267	222	191	191
   query31	897	869	773	773
   query32	70	69	63	63
   query33	457	353	301	301
   query34	764	862	512	512
   query35	781	815	758	758
   query36	954	985	895	895
   query37	122	103	79	79
   query38	4254	4218	4175	4175
   query39	1467	1436	1448	1436
   query40	209	115	104	104
   query41	53	53	49	49
   query42	119	104	102	102
   query43	516	514	472	472
   query44	1324	809	822	809
   query45	191	171	165	165
   query46	856	1038	669	669
   query47	1893	1887	1785	1785
   query48	378	413	305	305
   query49	712	516	424	424
   query50	713	777	416	416
   query51	4267	4320	4324	4320
   query52	105	105	91	91
   query53	250	264	196	196
   query54	490	507	425	425
   query55	91	81	85	81
   query56	282	277	247	247
   query57	1139	1194	1120	1120
   query58	240	245	237	237
   query59	2998	2981	2954	2954
   query60	295	265	268	265
   query61	127	119	126	119
   query62	742	747	694	694
   query63	238	191	195	191
   query64	1856	1062	687	687
   query65	4544	4422	4432	4422
   query66	750	403	305	305
   query67	16042	15728	15360	15360
   query68	6876	878	509	509
   query69	535	301	294	294
   query70	1204	1083	1100	1083
   query71	501	306	272	272
   query72	5837	3597	3862	3597
   query73	1463	724	341	341
   query74	9599	9222	8802	8802
   query75	3991	3183	2703	2703
   query76	4216	1198	754	754
   query77	836	354	278	278
   query78	10001	10165	9286	9286
   query79	2903	829	578	578
   query80	684	532	441	441
   query81	488	260	217	217
   query82	636	124	94	94
   query83	222	174	155	155
   query84	281	107	74	74
   query85	783	356	309	309
   query86	351	315	245	245
   query87	4436	4449	4478	4449
   query88	3438	2249	2280	2249
   query89	417	311	277	277
   query90	1913	212	223	212
   query91	136	140	112	112
   query92	74	66	55	55
   query93	1577	1041	585	585
   query94	659	416	310	310
   query95	349	331	263	263
   query96	486	574	284	284
   query97	3339	3365	3291	3291
   query98	226	207	199	199
   query99	1473	1422	1266	1266
   Total cold run time: 299839 ms
   Total hot run time: 192228 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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2425683561

   run cloud_p0


-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2422318623

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1975269929


##########
fe/fe-core/src/main/java/org/apache/doris/backup/BackupHandler.java:
##########
@@ -435,14 +436,27 @@ private void backup(Repository repository, Database db, BackupStmt stmt) throws
                 if (Config.ignore_backup_not_support_table_type) {
                     LOG.warn("Table '{}' is a {} table, can not backup and ignore it."
                             + "Only OLAP(Doris)/ODBC/VIEW table can be backed up",
-                            tblName, tbl.getType().toString());
+                            tblName, tbl.isTemporary() ? "temporary" : tbl.getType().toString());
                     tblRefsNotSupport.add(tblRef);
                     continue;
                 } else {
                     ErrorReport.reportDdlException(ErrorCode.ERR_NOT_OLAP_TABLE, tblName);
                 }
             }
 
+            if (tbl.isTemporary()) {
+                if (Config.ignore_backup_not_support_table_type) {
+                    LOG.warn("Table '{}' is a temporary table, can not backup and ignore it."
+                            + "Only OLAP(Doris)/ODBC/VIEW table can be backed up",
+                            Util.getTempTableDisplayName(tblName));
+                    tblRefsNotSupport.add(tblRef);
+                    continue;
+                } else {
+                    ErrorReport.reportDdlException("Table " + Util.getTempTableDisplayName(tblName)

Review Comment:
   what action should take if a backup job only contains one temporary table and has no olap tables?



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1978830411


##########
fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java:
##########
@@ -127,7 +127,7 @@ public void processCreateMaterializedView(CreateMaterializedViewStmt stmt)
         Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(dbName);
         Env.getCurrentInternalCatalog().checkAvailableCapacity(db);
 
-        OlapTable olapTable = (OlapTable) db.getTableOrMetaException(tableName, TableType.OLAP);
+        OlapTable olapTable = (OlapTable) db.getNonTempTableOrMetaException(tableName, TableType.OLAP);

Review Comment:
   done, forbid create async mtmv as well



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1971210290


##########
fe/fe-core/src/main/java/org/apache/doris/alter/Alter.java:
##########
@@ -127,7 +127,7 @@ public void processCreateMaterializedView(CreateMaterializedViewStmt stmt)
         Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(dbName);
         Env.getCurrentInternalCatalog().checkAvailableCapacity(db);
 
-        OlapTable olapTable = (OlapTable) db.getTableOrMetaException(tableName, TableType.OLAP);
+        OlapTable olapTable = (OlapTable) db.getNonTempTableOrMetaException(tableName, TableType.OLAP);

Review Comment:
   will implement it in pr later



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2706239793

   TeamCity cloud ut coverage result:
    Function Coverage: 82.15% (1063/1294) 
    Line Coverage: 65.75% (17648/26840)
    Region Coverage: 65.19% (8697/13340)
    Branch Coverage: 55.17% (4695/8510)
    Coverage Report: http://coverage.selectdb-in.cc/coverage/4023ed7d094f26de95d765585f31c2abe6a75def_4023ed7d094f26de95d765585f31c2abe6a75def_cloud/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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2705960703

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 31.48 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 5b80f6d3e35a336c82550aa9ece08e05e8348c8c, data reload: false
   
   query1	0.04	0.03	0.02
   query2	0.10	0.05	0.04
   query3	0.27	0.06	0.05
   query4	1.61	0.07	0.08
   query5	0.55	0.55	0.55
   query6	1.20	0.74	0.71
   query7	0.02	0.01	0.02
   query8	0.06	0.04	0.04
   query9	0.62	0.53	0.52
   query10	0.58	0.60	0.58
   query11	0.25	0.13	0.12
   query12	0.26	0.13	0.13
   query13	0.64	0.62	0.61
   query14	2.80	2.74	2.82
   query15	1.00	0.90	0.88
   query16	0.38	0.38	0.37
   query17	1.05	1.04	1.07
   query18	0.19	0.18	0.19
   query19	1.98	1.96	1.91
   query20	0.01	0.01	0.01
   query21	15.35	0.97	0.67
   query22	0.93	1.11	0.82
   query23	14.72	1.53	0.75
   query24	5.09	0.62	0.29
   query25	0.16	0.09	0.08
   query26	0.55	0.22	0.18
   query27	0.08	0.08	0.09
   query28	11.08	1.20	0.58
   query29	12.61	4.03	3.43
   query30	0.28	0.08	0.06
   query31	2.83	0.64	0.43
   query32	3.23	0.60	0.50
   query33	3.04	3.16	3.06
   query34	16.53	5.13	4.40
   query35	4.47	4.45	4.44
   query36	0.63	0.51	0.50
   query37	0.20	0.17	0.16
   query38	0.17	0.16	0.15
   query39	0.05	0.04	0.04
   query40	0.19	0.15	0.15
   query41	0.10	0.06	0.05
   query42	0.06	0.04	0.04
   query43	0.05	0.04	0.04
   Total cold run time: 106.01 s
   Total hot run time: 31.48 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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2604371937

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 30.97 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 a67688672ceec85887fd2b7ad0e7edce3c29e316, data reload: false
   
   query1	0.03	0.03	0.03
   query2	0.08	0.04	0.04
   query3	0.23	0.06	0.06
   query4	1.65	0.08	0.09
   query5	0.41	0.42	0.40
   query6	1.16	0.67	0.66
   query7	0.02	0.01	0.01
   query8	0.06	0.06	0.05
   query9	0.54	0.50	0.50
   query10	0.54	0.57	0.54
   query11	0.16	0.12	0.12
   query12	0.15	0.12	0.12
   query13	0.62	0.61	0.60
   query14	2.72	2.84	2.82
   query15	0.90	0.84	0.84
   query16	0.38	0.38	0.39
   query17	1.06	0.99	0.99
   query18	0.19	0.19	0.21
   query19	1.85	1.79	2.05
   query20	0.02	0.01	0.01
   query21	15.35	0.98	0.68
   query22	0.77	0.79	0.72
   query23	14.91	1.46	0.68
   query24	2.19	0.36	0.23
   query25	0.15	0.09	0.08
   query26	0.27	0.18	0.19
   query27	0.08	0.08	0.08
   query28	13.43	1.25	0.54
   query29	12.66	4.13	3.44
   query30	0.24	0.07	0.05
   query31	2.82	0.60	0.39
   query32	3.23	0.57	0.49
   query33	3.03	3.02	3.08
   query34	16.64	5.13	4.54
   query35	4.58	4.52	4.60
   query36	0.61	0.48	0.47
   query37	0.20	0.17	0.16
   query38	0.15	0.15	0.16
   query39	0.05	0.04	0.04
   query40	0.16	0.13	0.14
   query41	0.09	0.05	0.05
   query42	0.07	0.06	0.06
   query43	0.05	0.04	0.04
   Total cold run time: 104.5 s
   Total hot run time: 30.97 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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2604327172

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 32266 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 a67688672ceec85887fd2b7ad0e7edce3c29e316, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	17843	5513	5454	5454
   q2	2051	327	176	176
   q3	10564	1226	730	730
   q4	10231	974	522	522
   q5	7796	2385	2129	2129
   q6	194	165	132	132
   q7	896	767	606	606
   q8	9254	1336	1150	1150
   q9	5292	4925	4900	4900
   q10	6847	2350	1881	1881
   q11	464	276	250	250
   q12	337	353	230	230
   q13	17771	3674	3096	3096
   q14	229	227	208	208
   q15	529	469	468	468
   q16	630	618	586	586
   q17	560	863	316	316
   q18	7186	6384	6372	6372
   q19	3810	971	593	593
   q20	299	310	185	185
   q21	2740	2144	1968	1968
   q22	374	345	314	314
   Total cold run time: 105897 ms
   Total hot run time: 32266 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	5696	5502	5508	5502
   q2	242	328	239	239
   q3	2263	2625	2318	2318
   q4	1441	1783	1334	1334
   q5	4326	4720	4717	4717
   q6	170	165	128	128
   q7	2060	1983	1797	1797
   q8	2615	2793	2723	2723
   q9	7282	7219	7323	7219
   q10	3005	3278	2768	2768
   q11	572	518	500	500
   q12	635	746	566	566
   q13	3616	3904	3354	3354
   q14	273	301	275	275
   q15	512	494	479	479
   q16	656	676	656	656
   q17	1219	1766	1276	1276
   q18	7744	7434	7247	7247
   q19	794	1174	1061	1061
   q20	1992	2027	1871	1871
   q21	5722	5174	4980	4980
   q22	638	607	563	563
   Total cold run time: 53473 ms
   Total hot run time: 51573 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] [feature](schema) support temporary table like mysql [doris]

Posted by "Jibing-Li (via GitHub)" <gi...@apache.org>.
Jibing-Li commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1949128256


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java:
##########
@@ -206,6 +207,9 @@ public List<AnalysisInfo> buildAnalysisInfosForDB(DatabaseIf<TableIf> db, Analyz
                 if (table instanceof View) {
                     continue;
                 }
+                if (table.isTemporary()) {

Review Comment:
   If we need to skip analyzing temp table,  we also need to skip it in AnalysisManager.buildAnalysisJobInfo and StatisticsAutoCollector.processOneJob.



##########
fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java:
##########
@@ -304,11 +308,23 @@ private void sendJobId(List<AnalysisInfo> analysisInfos, boolean proxy) {
             row.add(databaseIf.isPresent() ? databaseIf.get().getFullName() : "DB may get deleted");
             if (databaseIf.isPresent()) {
                 Optional<? extends TableIf> table = databaseIf.get().getTable(analysisInfo.tblId);
-                row.add(table.isPresent() ? table.get().getName() : "Table may get deleted");
+                row.add(table.isPresent() ? Util.getTempTableDisplayName(table.get().getName())

Review Comment:
   Why do we need to do this and the following about newColNames if we skip analyze temp table?



-- 
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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2343216364

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 193093 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 e5c93fb7d5c8306fff4f1cfadc5f3ca7ecc61a04, data reload: false
   
   query1	918	378	375	375
   query2	6460	1950	1856	1856
   query3	6648	210	232	210
   query4	34100	23235	23558	23235
   query5	4171	526	481	481
   query6	251	161	156	156
   query7	4584	287	285	285
   query8	284	234	215	215
   query9	8475	2477	2480	2477
   query10	435	272	267	267
   query11	17933	15275	15283	15275
   query12	153	98	97	97
   query13	1640	391	367	367
   query14	9423	7112	7139	7112
   query15	299	177	175	175
   query16	8137	481	451	451
   query17	1621	584	564	564
   query18	2144	301	294	294
   query19	333	156	150	150
   query20	120	112	110	110
   query21	208	108	108	108
   query22	4433	4230	4205	4205
   query23	34093	33498	33938	33498
   query24	11240	2954	2956	2954
   query25	659	414	412	412
   query26	1393	157	160	157
   query27	2819	276	280	276
   query28	7719	2051	2043	2043
   query29	909	426	423	423
   query30	307	162	157	157
   query31	999	772	793	772
   query32	106	60	58	58
   query33	778	301	289	289
   query34	972	479	470	470
   query35	879	733	720	720
   query36	1093	932	938	932
   query37	164	100	87	87
   query38	4098	3918	3915	3915
   query39	1452	1413	1397	1397
   query40	278	119	120	119
   query41	55	49	49	49
   query42	121	97	100	97
   query43	499	461	465	461
   query44	1234	761	749	749
   query45	198	170	174	170
   query46	1118	745	755	745
   query47	1887	1791	1844	1791
   query48	366	286	289	286
   query49	1091	535	435	435
   query50	831	399	403	399
   query51	7034	6973	7007	6973
   query52	102	86	87	86
   query53	255	185	211	185
   query54	1039	457	446	446
   query55	79	76	74	74
   query56	280	259	254	254
   query57	1208	1090	1090	1090
   query58	279	270	254	254
   query59	2930	2695	2834	2695
   query60	299	275	277	275
   query61	108	99	97	97
   query62	844	639	680	639
   query63	223	186	189	186
   query64	5223	708	635	635
   query65	3292	3181	3170	3170
   query66	1423	333	338	333
   query67	15961	15377	15245	15245
   query68	3121	867	841	841
   query69	419	319	325	319
   query70	1202	1122	1187	1122
   query71	371	345	329	329
   query72	6105	3534	3458	3458
   query73	588	574	574	574
   query74	9057	8991	9042	8991
   query75	3155	2928	2960	2928
   query76	1849	850	849	849
   query77	486	411	402	402
   query78	10048	9218	9303	9218
   query79	921	871	853	853
   query80	828	805	809	805
   query81	446	260	255	255
   query82	272	266	265	265
   query83	213	195	193	193
   query84	276	112	104	104
   query85	635	385	381	381
   query86	309	302	319	302
   query87	4427	4355	4263	4263
   query88	4360	4058	4050	4050
   query89	383	382	360	360
   query90	1310	310	305	305
   query91	121	123	122	122
   query92	116	72	73	72
   query93	923	945	918	918
   query94	448	374	382	374
   query95	415	409	411	409
   query96	471	467	469	467
   query97	3106	3117	3103	3103
   query98	233	215	221	215
   query99	1401	1283	1294	1283
   Total cold run time: 288722 ms
   Total hot run time: 193093 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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2426011822

   run external


-- 
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] [feature](schema) support temporary table like mysql/sr [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2360464777

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2563569637

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 32695 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 78a93210171a3a3267ccedc083bb36ac6dd0dcf8, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	17582	6154	6070	6070
   q2	2055	306	171	171
   q3	10416	1240	743	743
   q4	10210	903	432	432
   q5	7553	2230	1982	1982
   q6	211	185	147	147
   q7	921	740	611	611
   q8	9244	1416	1209	1209
   q9	5405	4992	4935	4935
   q10	6769	2346	1874	1874
   q11	494	274	267	267
   q12	353	367	217	217
   q13	17760	3620	3010	3010
   q14	235	237	230	230
   q15	577	508	498	498
   q16	631	617	586	586
   q17	567	863	326	326
   q18	7170	6529	6353	6353
   q19	3830	1005	598	598
   q20	294	316	183	183
   q21	2807	2172	1944	1944
   q22	368	342	309	309
   Total cold run time: 105452 ms
   Total hot run time: 32695 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	6454	6243	6282	6243
   q2	236	332	235	235
   q3	2294	2693	2340	2340
   q4	1449	1905	1403	1403
   q5	4364	4768	4896	4768
   q6	177	176	145	145
   q7	2156	2011	1849	1849
   q8	2649	2824	2709	2709
   q9	7264	7387	7353	7353
   q10	3125	3372	2725	2725
   q11	583	514	508	508
   q12	691	808	607	607
   q13	3454	3851	3121	3121
   q14	280	315	271	271
   q15	569	512	517	512
   q16	662	712	657	657
   q17	1225	1763	1256	1256
   q18	7885	7594	7536	7536
   q19	842	1186	1092	1092
   q20	1989	2054	1911	1911
   q21	5878	5077	5070	5070
   q22	665	643	587	587
   Total cold run time: 54891 ms
   Total hot run time: 52898 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] [feature](schema) support temporary table like mysql [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2563578966

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 199138 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 78a93210171a3a3267ccedc083bb36ac6dd0dcf8, data reload: false
   
   query1	1300	977	932	932
   query2	6318	2518	2262	2262
   query3	11121	5031	4907	4907
   query4	33084	23656	23543	23543
   query5	4313	620	449	449
   query6	294	204	181	181
   query7	3995	500	313	313
   query8	319	265	243	243
   query9	9539	2764	2784	2764
   query10	468	304	259	259
   query11	18076	15615	15315	15315
   query12	170	108	109	108
   query13	1631	549	406	406
   query14	11524	7444	7807	7444
   query15	260	211	196	196
   query16	8096	674	514	514
   query17	1549	798	617	617
   query18	2145	428	334	334
   query19	244	187	157	157
   query20	123	116	117	116
   query21	201	125	107	107
   query22	4577	4512	4502	4502
   query23	34665	33888	33599	33599
   query24	6485	2425	2384	2384
   query25	506	447	388	388
   query26	910	277	151	151
   query27	2191	468	338	338
   query28	5371	2521	2492	2492
   query29	673	566	430	430
   query30	217	208	153	153
   query31	986	953	864	864
   query32	93	61	60	60
   query33	515	375	313	313
   query34	773	860	510	510
   query35	808	838	755	755
   query36	1030	1077	970	970
   query37	118	100	77	77
   query38	4343	4230	4233	4230
   query39	1508	1485	1459	1459
   query40	207	117	101	101
   query41	48	46	41	41
   query42	116	103	107	103
   query43	528	540	510	510
   query44	1404	849	842	842
   query45	185	177	171	171
   query46	877	1076	674	674
   query47	1977	2013	1945	1945
   query48	393	401	322	322
   query49	721	482	382	382
   query50	635	701	408	408
   query51	7285	7259	7232	7232
   query52	105	101	97	97
   query53	230	252	190	190
   query54	482	493	408	408
   query55	83	83	83	83
   query56	257	245	228	228
   query57	1279	1250	1176	1176
   query58	246	231	214	214
   query59	3404	3519	3495	3495
   query60	277	267	258	258
   query61	111	104	107	104
   query62	859	840	763	763
   query63	240	201	195	195
   query64	3770	1044	665	665
   query65	3403	3259	3287	3259
   query66	799	411	303	303
   query67	16539	15800	15513	15513
   query68	9842	756	503	503
   query69	472	299	252	252
   query70	1232	1145	1148	1145
   query71	440	297	252	252
   query72	6216	3894	3848	3848
   query73	660	761	376	376
   query74	10164	9053	9343	9053
   query75	4414	3108	2671	2671
   query76	5071	1208	824	824
   query77	925	377	283	283
   query78	10205	10331	10449	10331
   query79	2892	850	612	612
   query80	747	529	424	424
   query81	495	277	224	224
   query82	484	147	122	122
   query83	195	156	160	156
   query84	280	97	78	78
   query85	790	387	315	315
   query86	390	317	302	302
   query87	4382	4567	4404	4404
   query88	4581	2227	2178	2178
   query89	423	325	296	296
   query90	1830	190	191	190
   query91	137	136	106	106
   query92	64	57	52	52
   query93	1391	832	524	524
   query94	642	411	290	290
   query95	332	261	254	254
   query96	482	611	293	293
   query97	2775	2813	2632	2632
   query98	228	228	197	197
   query99	1799	1515	1427	1427
   Total cold run time: 301979 ms
   Total hot run time: 199138 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] [feature](schema) support temporary table like mysql [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2709356407

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1978831436


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/DatabaseIf.java:
##########
@@ -167,6 +183,17 @@ default T getTableOrMetaException(String tableName, TableIf.TableType tableType)
         return table;
     }
 
+    default T getNonTempTableOrMetaException(String tableName, TableIf.TableType tableType)
+            throws MetaNotFoundException {
+        T table = getNonTempTableOrMetaException(tableName);
+        TableType type = Objects.requireNonNull(table.getType());

Review Comment:
   done



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1978835045


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java:
##########
@@ -304,11 +308,23 @@ private void sendJobId(List<AnalysisInfo> analysisInfos, boolean proxy) {
             row.add(databaseIf.isPresent() ? databaseIf.get().getFullName() : "DB may get deleted");
             if (databaseIf.isPresent()) {
                 Optional<? extends TableIf> table = databaseIf.get().getTable(analysisInfo.tblId);
-                row.add(table.isPresent() ? table.get().getName() : "Table may get deleted");
+                row.add(table.isPresent() ? Util.getTempTableDisplayName(table.get().getName())

Review Comment:
   done. now temp table will be analyzed as well



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2603902211

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #40680:
URL: https://github.com/apache/doris/pull/40680#discussion_r1975326911


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/AnalysisManager.java:
##########
@@ -206,6 +207,9 @@ public List<AnalysisInfo> buildAnalysisInfosForDB(DatabaseIf<TableIf> db, Analyz
                 if (table instanceof View) {
                     continue;
                 }
+                if (table.isTemporary()) {

Review Comment:
   done. removed this restriction.



-- 
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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2706201395

   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] [feature](schema) support temporary table like mysql [doris]

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #40680:
URL: https://github.com/apache/doris/pull/40680#issuecomment-2706586123

   run feut


-- 
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