support insert the ret-value of a query into a table with `partition`, `with label`, `cols` tags: ``` insert into t partition (p1, p2) with label label_1 (c1, c2, c3) [hint1, hint2] with cte as ( select * from src ) select k1, k2, k3 from cte ``` we create new class: InsertIntoTableCommand, Unbound/Logical/PhysicalOlapTableSink to describe the command of insert and the olapTableSink for Nereids. We make UnboundOlapTableSink in parsing phase and bind it, then implement and translate the node to OlapTableSink. Then we run the command with a transaction.
25 lines
4.5 KiB
Plaintext
25 lines
4.5 KiB
Plaintext
1;0;1;10;23795;5354529;107090645;0.1;0.5244;24.3952;char11;varchar11;string1;2012-03-01;2012-03-01;2012-03-01 01:00:01;2012-03-01 01:00:01;12.012;1234.01234;12345678.012345;[1]
|
|
1;0;2;20;47545;10698279;213965645;0.2;0.7416;34.4837;char12;varchar12;string2;2012-03-02;2012-03-02;2012-03-02 02:01:02;2012-03-02 02:01:02;23.123;2345.12345;23456789.123456;[2]
|
|
2;0;3;40;95045;21385779;427715645;0.3;1.0368;48.7558;char13;varchar13;string3;2012-03-03;2012-03-03;2012-03-03 03:02:03;2012-03-03 03:02:03;34.234;3456.23456;34567900.234567;[3]
|
|
2;0;4;80;190045;42760779;855215645;0.4;1.4491;68.9429;char11;varchar11;string1;2012-03-04;2012-03-04;2012-03-04 04:03:04;2012-03-04 04:03:04;45.345;4567.34567;45679011.345678;[4]
|
|
3;0;5;160;380045;85510779;1710215645;0.5;2.031;97.4942;char12;varchar12;string2;2012-03-05;2012-03-05;2012-03-05 05:04:05;2012-03-05 05:04:05;56.456;5678.45678;56790122.456789;[5]
|
|
4;0;6;320;760045;171010779;3420215645;0.6;2.8548;137.8736;char13;varchar13;string3;2012-03-06;2012-03-06;2012-03-06 06:05:06;2012-03-06 06:05:06;67.567;6789.56789;67901233.5679;[6]
|
|
4;0;7;640;1520045;342010779;6840215645;0.7;4.0218;194.9798;char11;varchar11;string1;2012-03-07;2012-03-07;2012-03-07 07:06:07;2012-03-07 07:06:07;78.678;7900.679;79012344.679011;[7]
|
|
5;1;8;1280;3040045;684010779;13680215645;0.8;5.6745;275.741;char12;varchar12;string2;2012-03-08;2012-03-08;2012-03-08 08:07:08;2012-03-08 08:07:08;89.789;9011.79011;90123455.790122;[8]
|
|
5;1;9;2560;6080045;1368010779;27360215645;0.9;8.0141;389.9553;char13;varchar13;string3;2012-03-09;2012-03-09;2012-03-09 09:08:09;2012-03-09 09:08:09;100.9;10122.90122;101234566.901233;[9]
|
|
6;1;10;5120;12160045;2736010779;54720215645;1;11.3248;551.479;char11;varchar11;string1;2012-03-10;2012-03-10;2012-03-10 10:09:10;2012-03-10 10:09:10;112.011;11234.01233;112345678.012344;[10]
|
|
6;1;11;10240;24320045;5472010779;109440215645;1.1;16.0086;779.9084;char12;varchar12;string2;2012-03-11;2012-03-11;2012-03-11 11:10:11;2012-03-11 11:10:11;123.122;12345.12344;123456789.123455;[11]
|
|
7;1;12;20480;48640045;10944010779;218880215645;1.2;22.634;1102.9565;char13;varchar13;string3;2012-03-12;2012-03-12;2012-03-12 12:11:12;2012-03-12 12:11:12;134.233;13456.23455;134567900.234566;[12]
|
|
7;0;1;10;23795;5354529;107090645;0.1;0.5244;24.3952;154.289;2319.121;10604.017;2012-03-01;2012-03-01;2012-03-01 01:00:01;2012-03-01 01:00:01;145.344;14567.34566;145679011.345677;[13]
|
|
8;0;2;20;47545;10698279;213965645;0.2;0.7416;34.4837;218.094;3278.082;14988.793;2012-03-02;2012-03-02;2012-03-02 02:01:02;2012-03-02 02:01:02;156.455;15678.45677;156790122.456788;[14]
|
|
8;0;3;40;95045;21385779;427715645;0.3;1.0368;48.7558;308.359;4634.741;21192.013;2012-03-03;2012-03-03;2012-03-03 03:02:03;2012-03-03 03:02:03;167.566;16789.56788;167901233.567899;[15]
|
|
9;0;4;80;190045;42760779;855215645;0.4;1.4491;68.9429;436.033;6553.688;29966.255;2012-03-04;2012-03-04;2012-03-04 04:03:04;2012-03-04 04:03:04;178.677;17900.67899;179012344.67901;[16]
|
|
9;0;5;160;380045;85510779;1710215645;0.5;2.031;97.4942;616.608;9267.73;42376.012;2012-03-05;2012-03-05;2012-03-05 05:04:05;2012-03-05 05:04:05;189.788;19011.7901;190123455.790121;[17]
|
|
10;0;6;320;760045;171010779;3420215645;0.6;2.8548;137.8736;871.989;13106.137;59926.842;2012-03-06;2012-03-06;2012-03-06 06:05:06;2012-03-06 06:05:06;200.899;20122.90121;201234566.901232;[18]
|
|
10;0;7;640;1520045;342010779;6840215645;0.7;4.0218;194.9798;1233.161;18534.585;84748.017;2012-03-07;2012-03-07;2012-03-07 07:06:07;2012-03-07 07:06:07;212.01;21234.01232;212345678.012343;[19]
|
|
11;1;8;1280;3040045;684010779;13680215645;0.8;5.6745;275.741;1743.94;26211.654;119850.851;2012-03-08;2012-03-08;2012-03-08 08:07:08;2012-03-08 08:07:08;223.121;22345.12343;223456789.123454;[20]
|
|
11;1;9;2560;6080045;1368010779;27360215645;0.9;8.0141;389.9553;2466.294;37068.731;169494.031;2012-03-09;2012-03-09;2012-03-09 09:08:09;2012-03-09 09:08:09;234.232;23456.23454;234567900.234565;[21]
|
|
12;1;10;5120;12160045;2736010779;54720215645;1;11.3248;551.479;3487.86;52422.999;239700.285;2012-03-10;2012-03-10;2012-03-10 10:09:10;2012-03-10 10:09:10;245.343;24567.34565;245679011.345676;[22]
|
|
12;1;11;10240;24320045;5472010779;109440215645;1.1;16.0086;779.9084;4932.574;74137.243;338987.059;2012-03-11;2012-03-11;2012-03-11 11:10:11;2012-03-11 11:10:11;256.454;25678.45676;256790122.456787;[23]
|
|
13;1;12;20480;48640045;10944010779;218880215645;1.2;22.634;1102.9565;6975.71;104845.843;479399.861;2012-03-12;2012-03-12;2012-03-12 12:11:12;2012-03-12 12:11:12;267.565;26789.56787;267901233.567898;[24]
|
|
null;null;null;null;null;null;null;null;null;null;null;null;null;null;null;null;null;null;null;null;[] |