From 12692980793ed29479ffe908e213dfbfed86f519 Mon Sep 17 00:00:00 2001 From: amorynan Date: Sat, 9 Sep 2023 15:39:24 +0800 Subject: [PATCH] add boundary regress tests for map & array --- ..._types_insert_into_with_duplicat_table.out | 16 + .../nested_types/test_scalar_types_100.csv | 100 +++ ...pes_insert_into_with_duplicat_table.groovy | 647 ++++++++++++++++++ 3 files changed, 763 insertions(+) create mode 100644 regression-test/data/datatype_p0/nested_types/test_nested_types_insert_into_with_duplicat_table.out create mode 100644 regression-test/data/datatype_p0/nested_types/test_scalar_types_100.csv create mode 100644 regression-test/suites/datatype_p0/nested_types/test_nested_types_insert_into_with_duplicat_table.groovy diff --git a/regression-test/data/datatype_p0/nested_types/test_nested_types_insert_into_with_duplicat_table.out b/regression-test/data/datatype_p0/nested_types/test_nested_types_insert_into_with_duplicat_table.out new file mode 100644 index 00000000000000..c37c52400542df --- /dev/null +++ b/regression-test/data/datatype_p0/nested_types/test_nested_types_insert_into_with_duplicat_table.out @@ -0,0 +1,16 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !sql_nested_table_dup_c -- +306 + +-- !sql_nested_table_dup2_c -- +306 + +-- !sql_nested_table_map_dup_c -- +306 + +-- !sql_nested_table_array_map_dup_c -- +306 + +-- !sql_nested_table_map_array_dup_c -- +306 + diff --git a/regression-test/data/datatype_p0/nested_types/test_scalar_types_100.csv b/regression-test/data/datatype_p0/nested_types/test_scalar_types_100.csv new file mode 100644 index 00000000000000..4e275b43d0423f --- /dev/null +++ b/regression-test/data/datatype_p0/nested_types/test_scalar_types_100.csv @@ -0,0 +1,100 @@ +-2147475406 1 45 23794 -11023 915989078 2115356192 15927.068 1392557423.3915009 45951348783208518.81 8340516346665031.310 2022-01-26 2022-04-13 11:13:48 2022-01-31 2022-02-16 06:07:21 130.50.6.0 DeniseMatthews@Yozio.mil Londonderry Alley 61 +-2147413967 1 -75 30533 -5435 -727385447 32929830 9577.5645 1334766997.510087 39973144022098028.8 5886463393340733.108 2022-06-23 2022-05-10 19:13:50 2022-01-17 2022-11-26 22:49:36 157.38.90.25 JoshuaLewis@Jayo.mil Loeprich Crossing 43 +-2147380173 1 -79 -5785 9752 1851350218 1121852298 25652.402 -1618061059.5135579 95821873014545736.897 38923569966532828.626 2022-10-30 2022-05-02 17:06:33 2022-08-11 2022-02-08 10:19:47 217.198.98.239 JoseBoyd@Voonder.info Lawn Lane 78 +-2147369329 0 -121 -22859 4733 -378861997 385323541 -22969.846 1483825622.420542 50940877800950041.95 87108729227937387.294 2022-06-05 2022-08-18 05:39:56 2022-08-21 2022-12-12 08:43:59 16.27.107.167 PhyllisSmith@Zoombox.org Village Green Terrace 55 +-2147367329 1 84 21471 -29331 1823545950 1200800855 -13832.219 801505090.724918 45495296019797580.477 45196001436348967.557 2022-02-17 2022-05-23 01:44:31 2022-08-01 2022-08-16 10:32:36 84.110.209.128 vLane@Dablist.edu Packers Street 34 +-2147339287 1 62 28989 -32018 650184880 -365849435 -21644.414 -78648426.469503 92593387160450273.87 39588697152489527.185 2022-07-23 2023-01-03 11:54:35 2022-08-02 2022-05-19 18:35:36 30.194.6.115 veniam@Thoughtstorm.mil Basil Street 79 +-2147306138 0 82 -32442 -6144 714240734 -1231183014 -13242.392 384775850.618081 95346047516039276.423 74114490752253685.481 2022-05-26 2022-05-24 08:29:39 2022-02-05 2022-04-08 02:48:34 169.31.82.131 illum_et@Dynabox.mil Warrior Parkway 77 +-2147303679 0 -96 15999 9232 -1599308504 -734311941 -5495.8071 -1399215099.7846489 17443816097166764.281 84525658185172942.967 2022-04-11 2022-01-19 15:51:51 2022-01-24 2022-12-02 04:39:45 8.212.247.122 xGonzales@Yamia.edu Thierer Way 38 +-2147262763 1 127 -1700 1542 130731024 335031107 19994.604 -1825872281.30349 55231262378035099.197 69682235501133830.355 2022-12-23 2022-10-21 07:09:28 2022-10-20 2022-06-30 08:03:59 244.225.174.1 zAllen@Edgetag.mil Arrowood Place 93 +-2147241282 1 17 -16304 -23590 421313153 447840244 -7585.0444 1840220725.287715 47206868481841239.822 72929785481453927.981 2022-05-04 2022-08-17 16:04:19 2022-02-27 2022-04-13 16:08:20 231.227.99.116 fugit@Tambee.com Little Fleur Avenue 96 +-2147234672 0 -48 10083 12902 293756986 -1365816427 3501.8916 -501012774.008986 85564175718642344.976 29822328119067807.175 2022-05-15 2022-03-10 22:02:49 2022-11-03 2022-04-24 05:23:32 186.147.184.146 BonnieSimmons@Oyope.net Lakewood Alley 37 +-2147220564 1 -3 -10961 -32113 -2086483017 1854884810 -5685.6948 -1648274138.040339 89701570207561342.341 52446198336966115.232 2022-03-31 2022-09-19 16:22:10 2022-12-02 2022-04-17 01:07:47 208.57.124.182 lPatterson@Meezzy.net Cascade Park 83 +-2147220530 0 -68 27003 -7963 -1749726923 1016429745 10021.474 -2045081975.098917 49223430141903125.79 58145291373473490.545 2022-08-08 2022-12-09 12:58:47 2022-07-25 2022-03-13 19:37:07 167.227.79.184 id@Jaxbean.org Florence Park 92 +-2147170182 0 -33 -15657 -12309 1888343611 168341736 10429.622 1433026351.1586189 38273503307442458.737 23092430621668026.713 2022-03-13 2022-06-13 20:49:14 2022-08-02 2022-08-16 19:42:30 76.13.7.252 earum@Shufflebeat.info Novick Alley 72 +-2147167855 1 59 -2102 11613 429729049 -1810964223 5669.7588 383834690.999246 47784385840870915.241 58526954263785775.470 2022-07-23 2022-09-27 21:37:17 2022-10-19 2022-02-28 09:13:06 116.166.202.138 NicoleJackson@Teklist.biz Steensland Circle 87 +-2147071037 0 60 -21638 17612 -2068486682 -351300386 -13496.469 -1954522093.3062749 81355805409001937.98 64611677704695220.731 2022-12-08 2022-11-14 15:26:56 2022-09-26 2022-07-30 02:47:43 72.26.237.241 JamesLopez@Nlounge.net Jenifer Parkway 34 +-2147038421 0 63 23955 27295 2098427263 551774470 30370.965 1873261498.9024529 93626359283633324.242 1440851989809227.726 2022-04-03 2022-10-05 06:46:26 2022-06-02 2022-05-06 14:36:09 112.95.128.98 AnnieBell@Meejo.net South Terrace 47 +-2146999016 0 -67 12209 10490 1666601359 -191558046 22327.137 -324191025.475507 99929623297985537.658 8706682236142820.237 2022-04-07 2022-01-23 04:59:06 2022-09-14 2022-08-24 00:28:28 57.73.12.124 nMartin@Divavu.name Crescent Oaks Avenue 86 +-2146973921 0 -85 -685 -2405 919669201 -2083543032 -30503.852 1616588624.9597061 24903212416358700.45 68627810911452355.200 2022-05-13 2022-06-04 20:38:39 2022-09-26 2022-01-19 18:58:51 189.26.210.28 MarilynWashington@Vinder.info Pawling Terrace 93 +-2146861169 1 81 -2824 10178 1616671669 203020347 25702.715 519120345.825994 9102614354938345.928 58971606284028208.940 2022-08-07 2022-07-10 06:21:48 2022-07-21 2022-05-26 20:01:58 14.181.121.211 RussellMason@Eazzy.gov 2nd Park 6 +-2146822202 0 -36 -23619 -26047 1582371149 596601012 8630.7041 -1115665955.4916 2476388505097042.944 77236300365480308.680 2022-12-15 2022-12-14 14:44:29 2022-10-16 2022-12-14 15:02:23 202.23.160.52 rem_ad_sit@Linklinks.mil Randy Way 97 +-2146803403 0 74 960 -7477 -2051390646 1540228673 -31983.715 812047625.72862 21838472783035225.643 88867383151247743.250 2022-03-01 2022-11-01 06:36:23 2022-11-01 2022-06-03 03:16:59 4.147.25.93 pTorres@Camimbo.mil Oak Valley Parkway 80 +-2146582299 0 85 -27853 1324 -1650959019 -1472434191 -18603.736 -499861526.004434 70283908283434864.739 42321764198164632.913 2022-12-22 2022-11-01 07:24:51 2022-12-16 2022-09-22 06:52:38 116.192.166.250 DonnaHawkins@Pixonyx.edu Grover Trail 43 +-2146564990 1 53 25839 8185 1077130648 807012435 -14279.709 6560114.936127 21548000979076644.209 47056284607153068.861 2022-04-07 2022-10-29 10:38:56 2023-01-10 2022-08-13 12:33:16 28.121.28.3 JenniferLopez@Devpulse.net Harbort Road 79 +-2146517980 0 119 -11719 -12530 -812156962 -122568571 28956.367 -1752583714.386843 43916212562252030.704 26620187467667027.195 2022-06-11 2022-04-28 14:16:05 2022-07-20 2022-12-04 03:25:28 80.213.202.166 PatriciaBishop@Youtags.gov Redwing Trail 31 +-2146495716 0 109 21484 23048 1777853186 1471267102 25702.85 148300441.94391 51074710968485572.32 13002292166538322.926 2022-08-09 2022-06-03 07:07:53 2022-04-27 2022-06-24 18:00:19 99.24.211.208 EvelynRice@Minyx.net Maple Street 51 +-2146477239 1 -71 -10895 -3231 1544014139 1313937231 29074.635 -108208031.479772 3800768464606510.269 90532685597830794.926 2022-09-11 2022-03-13 11:51:35 2022-10-24 2022-05-23 04:38:46 218.219.46.247 TimothyBowman@Leexo.info Trailsway Point 97 +-2146449031 1 3 31881 12622 -835781221 -1439511933 10810.164 -1041749657.675557 47620162910458136.975 70738076271602363.141 2022-10-26 2022-01-17 10:52:56 2022-08-16 2022-07-01 19:38:44 49.222.69.178 4Fields@Flipbug.org Marquette Junction 3 +-2146400130 0 -78 -16371 -32117 1360465595 -219994576 -11442.081 -1234009689.778173 26021135988565174.2 88370525725068482.505 2022-08-30 2022-06-19 18:54:13 2022-08-11 2022-08-30 19:41:40 252.136.194.236 kHawkins@Linkbuzz.edu Buhler Lane 34 +-2146367811 0 112 25407 -16877 1290695679 46285736 -16979.607 -616399770.11097 95798148476984480.956 64938168551880736.250 2023-01-09 2022-09-02 16:43:05 2022-06-09 2022-11-15 09:37:40 59.207.196.102 yDiaz@JumpXS.info Dottie Hill 79 +-2146259170 0 -48 -9147 4321 -1275173801 -679287518 -782.96674 -1989177332.756572 7113020583870576.802 81184822389678743.948 2022-04-14 2022-06-24 03:04:22 2022-09-09 2022-12-12 22:32:41 96.198.83.221 eaque_voluptas@Skaboo.gov Bobwhite Park 95 +-2146227671 1 38 3199 6154 156878176 142376745 -5616.5903 1999769776.495497 95338145891386545.822 44635105305534225.122 2022-10-15 2022-11-25 00:46:47 2022-03-25 2022-09-11 23:58:44 214.15.97.228 bOwens@Oozz.name Atwood Drive 94 +-2146189866 0 -125 10363 15234 -1242115105 -2008134886 28431.93 2016316456.8750169 26808579354082227.593 85575675066951751.206 2022-06-26 2022-12-12 08:00:54 2022-02-22 2022-07-09 05:06:14 225.8.171.247 qui_culpa_corporis@Jazzy.mil Starling Way 22 +-2146182665 1 -126 -9842 -15949 -705548821 -1268773397 -12721.22 311896719.505819 45371634693300005.877 57518353894747451.330 2022-08-27 2022-03-08 14:16:57 2022-09-14 2022-11-19 20:41:09 196.116.99.255 corrupti_recusandae_distinctio@Mydeo.name Tomscot Parkway 80 +-2146163661 1 -9 -6191 3725 1118274531 -1491226994 20852.549 1219586426.7228949 20063506131529737.201 86263100386121098.503 2022-11-26 2022-07-06 20:36:00 2022-08-07 2022-06-25 03:45:59 166.106.100.67 fHudson@Oyoyo.info Anhalt Junction 69 +-2146145479 1 115 -31626 24835 468792617 1776909375 30019.051 -1679301024.0002871 85375396702905307.775 48368955491907175.294 2022-06-25 2022-07-20 12:21:13 2022-10-20 2022-02-20 23:49:54 174.90.113.38 lCunningham@Aimbu.org Milwaukee Junction 23 +-2146062572 1 85 10733 31870 305720846 -1141536191 -13008.365 1719287295.649487 93088835134891116.722 45414904693614422.501 2022-07-18 2022-05-12 17:20:08 2022-05-06 2022-12-28 20:04:32 182.228.154.114 KellyPerry@Eamia.net Harbort Lane 11 +-2146044782 0 45 28866 -29323 -1668074083 272624707 22338.168 357368915.263751 38293538835351491.805 75157465420643291.660 2022-06-07 2022-07-18 22:12:21 2022-02-04 2022-02-15 12:25:12 186.98.36.253 MargaretCox@Npath.org Linden Trail 42 +-2145970543 0 11 -29565 1158 -1527730334 399180986 19722.717 1251554135.3197169 40658391723993420.706 44185253771848385.156 2022-01-28 2022-07-10 00:59:19 2022-09-23 2022-11-15 12:58:27 122.171.24.45 TheresaSanchez@Vipe.com Morningstar Court 0 +-2145929604 1 -86 -1617 14607 -1076595694 -1727723754 -18170.061 -1816106544.7038341 21908195993588334.463 82349972554547635.107 2022-04-17 2022-10-14 16:54:55 2022-05-29 2022-11-19 16:05:00 96.133.98.227 rBishop@Mudo.edu Fordem Road 94 +-2145832027 0 -81 22321 -16757 -848281144 783508735 -13826.459 520550717.214763 86994123933991820.457 17218767804756892.590 2022-08-25 2022-09-05 06:19:31 2022-07-15 2022-08-25 16:01:12 196.155.19.229 cSmith@Avamba.com Parkside Way 29 +-2145739104 1 10 -22603 6132 -984517723 138439036 8683.9043 1681202635.040786 49683339998558535.395 38251259739648714.297 2022-04-26 2022-09-12 00:32:18 2022-11-20 2023-01-09 16:19:06 180.215.212.86 KathyRoberts@Talane.info Darwin Center 26 +-2145722565 0 -25 31882 24465 -1761136832 -295515357 -9526.9219 -12925414.621229 22608011502065630.802 71368184597386700.659 2022-08-16 2022-01-12 00:15:54 2022-08-05 2022-11-20 00:03:29 248.111.226.86 ShirleyWashington@Photojam.biz Mariners Cove Street 72 +-2145665591 0 -116 -26163 21122 623227152 1468000005 -30261.648 1694091260.025321 35716264325571392.235 71693879700537512.756 2022-08-27 2022-03-26 10:05:15 2022-01-29 2022-12-27 01:05:27 217.164.24.148 zParker@Topicstorm.net Bashford Center 41 +-2145633486 0 -7 -29261 -14663 1446719542 -1643728420 -15327.756 -257716890.997028 70421564778970287.808 76282863984144460.436 2022-08-05 2022-10-28 00:21:26 2022-05-12 2022-08-26 07:31:12 170.155.83.47 mTurner@Tagpad.net Green Lane 18 +-2145632811 0 68 -16237 -31873 -492698917 350757927 12625.895 1400661023.750335 33383841474886390.439 91709334227041002.853 2022-04-14 2022-08-19 18:08:51 2022-02-07 2022-02-19 16:27:39 55.44.200.103 est_commodi@Skinder.com Fuller Pass 10 +-2145601425 0 -42 -21289 16303 1715251077 -768157880 -16677.92 858580400.165352 84889989042179242.388 83277010238707085.868 2022-11-03 2022-04-24 14:14:38 2022-04-08 2022-10-05 12:07:32 250.212.97.21 excepturi_accusantium@Pixoboo.mil Graceland Center 31 +-2145561361 1 97 -27380 -30393 933246548 -1910617227 28721.449 -1277642339.7692859 62328918632405846.629 20238751781349550.514 2022-11-14 2022-12-14 13:34:30 2022-09-09 2022-12-19 20:04:35 23.58.157.18 rerum_occaecati@Oodoo.gov Golf Course Terrace 68 +-2145460379 0 -95 5722 -16508 -124831759 -587191090 8284.35 -242024146.630121 80881311321913929.245 42618318053361217.455 2022-02-25 2022-04-28 12:42:53 2022-12-09 2022-02-10 11:15:17 200.138.143.177 IreneAnderson@Babblestorm.net Fordem Road 11 +-2145425147 0 124 -7791 -30996 595721721 -1102059603 -32708.266 1665604964.101907 55864976045339865.119 94874173505018262.845 2022-09-02 2022-07-10 02:43:06 2022-07-19 2022-12-25 13:11:31 193.38.117.73 sGarza@Layo.com Delaware Pass 19 +-2145396106 1 -83 -20898 31609 -307605479 -2094510426 30493.371 878466307.117619 83136457059671165.732 41114370644431941.515 2022-11-15 2022-09-20 08:30:47 2022-05-17 2022-01-15 08:30:33 222.141.128.219 eWillis@Rhyloo.edu Rowland Lane 63 +-2145360501 0 -110 -15175 -18712 515185152 1239978996 -2291.9849 2116240058.1139021 23841421408124599.728 45350604150789138.167 2022-05-01 2022-11-09 02:59:53 2022-10-24 2022-03-14 12:38:10 76.217.234.230 SamuelSimmons@Yotz.info Sutteridge Avenue 56 +-2145299388 1 -101 12056 13671 268136166 -618219111 -20649.189 1608059836.4739521 81743649494764280.259 32070149770666675.420 2022-07-22 2022-07-27 16:30:27 2022-11-01 2022-05-06 18:41:55 217.114.13.223 ea@Tazzy.name Reinke Crossing 93 +-2145291376 1 -105 8701 -6812 -1011912910 -1066656918 2380.9619 -2108710402.7121351 99444820994343516.701 15100141674083750.907 2022-08-22 2022-11-08 21:42:18 2022-11-06 2022-11-08 00:21:08 110.161.17.198 iusto_vero_minus@Flashdog.info Sunbrook Drive 13 +-2145194985 1 83 5864 27521 -1337479564 -580923735 -27982.447 -1586058801.6278429 85274571766729620.277 43007736970908035.636 2022-10-05 2022-02-24 15:00:09 2022-09-26 2022-01-28 22:17:26 181.67.114.151 tFowler@Babbleset.org Park Meadow Plaza 1 +-2145117133 1 43 -22233 -15578 -1374063749 2102972527 15984.653 286225644.695247 15704479415194073.33 42338288870486002.517 2022-12-12 2022-11-17 02:15:20 2022-08-05 2022-10-04 14:21:17 15.253.144.136 VirginiaLittle@Zava.edu Northview Pass 25 +-2145053697 1 63 24678 30780 1386254260 1727111403 -3694.6951 -1739481366.5108931 88618778931917380.493 45701286296992048.290 2022-03-05 2022-03-26 21:05:09 2022-05-24 2022-05-26 02:55:13 70.0.191.108 uRichards@Riffwire.info Londonderry Plaza 16 +-2144972147 1 88 17229 -17732 1593680044 34341236 26159.938 36622745.943803 88358697061566919.847 88334931490026854.464 2022-04-20 2022-04-12 23:10:09 2022-02-10 2022-09-05 07:07:34 58.194.131.41 PeterGreene@Jaxnation.gov Forster Park 81 +-2144966593 1 -27 9653 -6739 1025051282 -633745072 28409.896 396529484.351023 85763035757670570.458 72529050683624762.160 2022-10-13 2022-06-06 23:45:32 2023-01-05 2022-12-24 16:52:24 132.36.250.18 ClarenceYoung@Edgepulse.biz Starling Center 38 +-2144966479 0 91 -18098 -24991 -1375439663 -454292026 -13798.354 -604479896.160994 71636202162968825.364 83294712839041576.770 2022-09-04 2022-12-17 16:55:34 2022-07-05 2022-02-03 18:28:27 253.32.48.110 GeraldFlores@Jayo.mil Memorial Plaza 71 +-2144959740 0 -67 -20993 -28898 -1055516969 1952651271 -26628.711 843239279.204007 79598054421552684.652 6846269631516872.934 2022-08-28 2022-07-25 03:21:54 2022-10-14 2022-10-09 19:01:57 74.60.33.163 HarryGreene@Twimm.info Novick Street 15 +-2144940625 1 59 14325 1293 -1454272015 1636582867 7828.9136 714184629.522527 93505841441868380.288 56380447721200594.233 2022-09-10 2022-10-19 05:03:04 2022-04-15 2022-07-10 22:10:42 10.78.99.245 RobinHenderson@Yakidoo.com Oak Place 30 +-2144845416 1 -81 -9152 7489 589678882 947357197 29273.635 1985251329.6431971 93869097107040064.747 75248225651730060.818 2022-04-12 2022-03-11 05:03:49 2022-10-12 2022-03-15 11:07:19 44.205.195.141 rMatthews@Demimbu.org Warrior Crossing 48 +-2144820475 1 -73 4950 27213 -1327633395 701390842 3292.8323 -69381031.0928 37074572129520413.797 35027726190684940.250 2022-08-09 2022-03-02 09:04:59 2022-12-14 2022-04-09 02:16:41 198.244.37.154 numquam@Yakijo.name Troy Drive 51 +-2144607746 0 122 19340 2026 -1579100047 -552500733 -29696.631 -1577550324.2880819 38927322641940550.63 70685944866009829.257 2022-09-06 2022-11-24 13:04:59 2022-02-05 2022-05-29 08:13:07 177.51.72.145 vSanchez@Brainsphere.gov Hayes Pass 50 +-2144563514 1 115 -13085 -29492 869753958 -150789058 19564.104 -781697798.634192 90520240448499160.11 25258872303793553.630 2022-11-19 2022-05-08 04:26:54 2022-09-26 2022-09-06 12:47:21 5.185.80.234 mRice@Meeveo.net Golf Point 88 +-2144376400 0 -18 20201 4388 -153955260 -1996968380 29197.625 -248142639.286893 90264002765485637.496 81449853952508666.733 2022-05-23 2022-05-03 21:41:39 2023-01-01 2022-08-04 14:24:34 123.164.170.233 quo@Innojam.net Paget Road 54 +-2144354593 1 -90 8919 -20662 1293340207 -362462464 -215.71274 -985675366.569135 34964025047403383.39 59692983529863851.202 2022-12-12 2022-09-05 15:27:21 2022-10-20 2022-05-15 00:43:56 47.250.130.192 eum_nam@Skyndu.org Namekagon Alley 52 +-2144334048 0 16 437 -1380 678833141 -1288685536 5194.0576 1844253162.901345 46137574862531306.999 54398595490959023.539 2022-06-05 2022-04-23 20:33:39 2022-06-16 2022-02-07 14:04:31 211.39.177.254 impedit_sit_atque@Skippad.mil Mallard Place 64 +-2144227801 1 58 -159 11215 1801132046 1696811958 -22308.641 -683719894.026245 16411995391647226.2 37580485653448904.580 2022-10-24 2022-07-31 00:29:25 2022-10-27 2022-03-17 19:22:50 36.138.55.238 LarryGreene@Mita.net Grim Junction 44 +-2144030103 1 -103 1605 -16717 1260682672 896689788 -6821.1284 715213723.010525 62079712857619101.783 38666447509787594.275 2022-12-18 2022-09-17 20:53:18 2022-04-04 2022-04-29 14:15:21 75.200.208.117 xKnight@Feedbug.info Sunbrook Park 8 +-2144013233 0 -119 1628 -28916 2038471071 1582504793 -11128.479 973453486.240564 84269555801451263.771 51980887713899057.696 2022-11-12 2022-03-29 19:45:20 2022-09-24 2022-05-16 10:14:18 30.144.183.87 facilis_aut_porro@Plajo.org Hollow Ridge Park 51 +-2143966117 0 -114 20692 2027 523580033 -1718467818 18184.66 -1354794501.3727529 86966527964375628.304 62487768983009646.601 2023-01-02 2022-05-03 03:41:27 2022-09-25 2022-09-24 21:19:08 42.8.63.24 JoeMontgomery@Yombu.org Kropf Pass 39 +-2143901919 0 43 -8993 -26732 1662967743 -1253916370 15632.667 -820574886.744517 6826439255534778.762 76341859464221972.596 2022-06-08 2022-08-30 14:02:41 2022-09-06 2022-03-06 06:26:46 213.150.37.193 eligendi@Trupe.gov Talmadge Crossing 22 +-2143820973 1 97 15802 -28578 -1996071321 -515217738 8389.3857 -1952411457.3189189 24155835405288626.3 34158493154201691.294 2022-10-29 2022-10-20 16:48:56 2022-06-19 2022-12-02 09:54:37 244.148.103.52 KarenGordon@Rhynoodle.gov Kipling Trail 22 +-2143802626 0 79 -29704 -23502 -130664066 727522946 1451.0667 520730371.13745 69847230671266302.43 56676269132838737.700 2022-02-20 2022-02-26 17:10:26 2022-04-04 2022-09-16 20:43:07 60.236.148.112 KathyHudson@Eidel.info Shasta Junction 7 +-2143782943 0 -22 20515 19610 -1319791794 -314420353 24465.053 1399304794.205512 68642611277069521.79 58684870966649713.973 2022-07-08 2022-07-23 08:50:18 2022-07-12 2022-06-09 07:00:52 90.69.59.165 xBell@Centidel.edu Tennyson Junction 67 +-2143721630 1 -103 -14534 30268 -391530620 -780530250 5588.2588 1705886332.835176 29752392497500497.358 72211476586480280.100 2022-10-27 2022-03-22 11:50:10 2022-04-27 2022-03-20 14:22:29 205.33.84.38 fWelch@Youfeed.com Linden Circle 48 +-2143709080 0 78 15558 -28566 1567367765 1711244548 -21312.086 -1676765755.015152 7483050290894384.235 14348426565176102.933 2022-02-05 2022-12-03 09:48:10 2022-06-01 2022-10-19 06:09:53 153.192.186.165 aperiam_officia_consequuntur@Skipfire.mil Golden Leaf Plaza 85 +-2143700018 0 36 30822 -12823 1194565379 -372629928 -12461.867 1111583246.475472 97844642199172550.685 45195433257693102.150 2022-09-16 2022-05-15 16:18:55 2022-04-10 2022-03-26 07:59:08 80.84.134.21 JaniceAdams@Oyoyo.biz Manley Road 16 +-2143665278 0 125 21712 -11361 1627015782 648335755 -6500.37 -1657840634.8634241 36489931479000188.87 53618549111404470.123 2022-06-24 2022-06-28 06:09:52 2022-08-16 2022-09-08 02:39:38 148.179.124.136 molestiae_aliquam_qui@Voolia.info Twin Pines Trail 2 +-2143553210 1 29 23596 -29085 1570476845 1400264311 5292.9404 985511588.312963 26691279718212282.618 52893811507411508.857 2022-08-14 2022-02-25 09:14:36 2022-09-24 2022-04-16 17:37:26 249.206.88.52 jFord@Edgepulse.com Kipling Terrace 14 +-2143466167 0 -48 20078 1500 -300859071 2094503425 7954.3755 -644064655.863321 44300022488505140.73 81346391493252121.766 2022-09-06 2022-11-03 09:45:24 2022-01-26 2022-07-14 21:49:44 210.221.225.180 MildredDean@Realpoint.edu Commercial Lane 81 +-2143338029 0 65 28583 -12447 -1738928304 1832257131 -9549.6064 -857526893.665941 9823233138475839.903 72520719681561428.918 2022-08-09 2022-08-26 21:34:09 2022-06-20 2022-02-18 04:31:46 218.100.49.17 pHowell@Viva.com Hagan Place 18 +-2143322102 1 80 -901 24978 -1298382804 -1594723068 -14798.968 -137237087.719268 10803354863834510.135 18681686412229393.419 2022-02-14 2022-12-01 05:49:36 2022-04-07 2023-01-04 16:45:56 250.165.224.250 eMccoy@Mita.com Cordelia Trail 34 +-2143291574 1 -21 10019 -17173 231513576 -2004769659 16172.086 941985713.954182 91415382278425718.329 11336194132112334.303 2022-03-10 2022-03-16 06:57:55 2022-12-04 2022-05-06 19:19:30 243.62.206.178 harum_omnis_tempora@Devcast.org Harper Circle 42 +-2143272783 0 36 -12429 20858 -1257516971 -1498805260 65.542076 705608237.236062 9831884881415128.78 37233508339616652.703 2022-02-07 2022-11-03 00:55:55 2022-03-11 2022-12-23 08:43:05 213.183.23.50 MartinAllen@Jetwire.name Cambridge Plaza 7 +-2143261604 0 107 -3152 2516 -827318298 1035637204 -31264.121 559726212.134293 133438066875759.909 91097319984287417.518 2022-07-27 2022-08-23 18:29:57 2022-06-01 2022-07-19 17:21:08 142.0.9.61 RubyGriffin@Yakitri.name Saint Paul Parkway 41 +-2143259207 0 6 8805 -26659 14206254 -923396935 2646.405 -233846503.166964 88387101518090024.893 32265882411468156.718 2022-10-23 2022-04-04 23:57:20 2022-04-26 2022-05-26 03:24:14 86.209.184.30 nulla_non_ducimus@Ntags.com Oak Valley Crossing 89 +-2143230815 0 -113 -11392 29571 -1728061216 1383605572 25424.891 1005644817.523787 80134094266764750.693 99692542460226750.956 2022-07-06 2022-02-02 11:40:11 2022-05-22 2022-02-04 08:26:05 32.200.80.169 tFox@Miboo.net Eagan Circle 52 +-2143194971 1 23 -5296 15175 2092789134 -132397296 -28776.523 -411055470.183943 3163530179594883.677 50152629379873430.922 2022-04-04 2022-04-03 01:03:54 2022-04-16 2022-06-15 19:17:08 128.67.32.225 dolorem_et@Einti.info Quincy Alley 73 +-2143184292 1 20 10547 -28168 -505889254 1981328355 19401.881 -385243397.236419 68821910027022343.629 18929155308543822.448 2022-01-15 2022-08-15 15:32:30 2022-08-07 2022-08-10 00:18:34 1.104.231.244 lRichards@Fanoodle.org Meadow Valley Way 72 +-2143169173 1 -114 29031 30776 1800482968 471248239 8144.2861 -1596954472.0818269 80438784671001111.616 47314925684213662.805 2022-12-13 2022-05-26 14:41:06 2022-09-18 2022-03-09 15:07:18 118.29.166.43 aut@Yakidoo.name Sutherland Plaza 47 +-2143151901 1 -5 25343 964 -1020210711 1745956682 -32360.256 -757727807.13815 34692749902950064.502 50366352212333617.332 2022-06-14 2022-07-09 14:04:22 2022-02-15 2022-12-22 22:22:53 17.211.38.238 oGarza@Blogpad.mil Onsgard Parkway 44 +-2143151578 0 121 -12031 7633 -792900177 -1163990602 32633.73 186557928.72995 59121988715094317.4 38985748215319285.270 2022-01-20 2022-05-12 12:39:44 2022-08-17 2022-08-29 00:04:52 148.154.162.223 eArnold@Layo.biz Hintze Lane 1 +-2143123905 0 -118 10642 -4563 -1341245502 1017224516 -8458.0029 -106193291.507292 925500132528675.116 7232999535645207.825 2022-05-24 2022-06-11 22:11:38 2022-08-29 2022-04-27 04:50:45 2.181.202.112 RogerJohnson@Trunyx.net Bowman Terrace 71 +-2143091699 0 71 -32492 -6263 -848327842 1461488007 7373.8604 746453563.054372 28995936497349734.606 27760760952367061.114 2022-01-18 2022-10-04 03:54:57 2022-06-01 2022-04-05 15:35:13 175.85.211.161 molestiae_consequuntur@Dabtype.com Eastlawn Park 94 +-2143062391 0 125 -30878 -6319 -1080576697 718283844 27974.408 -1042341679.9821891 67474748942299945.603 33437893206525638.770 2022-07-15 2022-02-22 11:33:13 2022-12-27 2022-03-04 02:36:29 201.58.156.107 JamesBurke@Plajo.gov Wayridge Drive 32 +-2143012777 1 33 -471 28391 838988547 -1029454439 12903.569 -1881843821.4741449 6725471621396771.937 1686758121140217.213 2022-04-15 2022-06-08 07:49:46 2022-06-15 2022-03-21 15:32:50 104.214.28.29 BrandonRay@Yakitri.info Blue Bill Park Way 89 +-2142919005 1 -5 -1177 -1958 1865952544 1073544445 -3874.7803 73792992.960694 37839748091455037.19 24958302880075589.133 2022-07-18 2022-06-11 06:21:46 2022-07-23 2022-09-09 20:15:06 42.208.163.52 PhilipReid@Yakijo.com Columbus Lane 50 diff --git a/regression-test/suites/datatype_p0/nested_types/test_nested_types_insert_into_with_duplicat_table.groovy b/regression-test/suites/datatype_p0/nested_types/test_nested_types_insert_into_with_duplicat_table.groovy new file mode 100644 index 00000000000000..e0bc822bdc42c5 --- /dev/null +++ b/regression-test/suites/datatype_p0/nested_types/test_nested_types_insert_into_with_duplicat_table.groovy @@ -0,0 +1,647 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import org.codehaus.groovy.runtime.IOGroovyMethods + +suite("test_nested_types_insert_into_with_duplicat_table", "p0") { + sql """ADMIN SET FRONTEND CONFIG ('disable_nested_complex_type' = 'false')""" + def dataFile = """test_scalar_types_100.csv""" + + // define dup key table1 with scala types + def scala_table_dup = "tbl_scalar_types_dup" + sql "DROP TABLE IF EXISTS ${scala_table_dup}" + sql """ + CREATE TABLE IF NOT EXISTS ${scala_table_dup} ( + `k1` bigint(11) NULL, + `c_bool` boolean NULL, + `c_tinyint` tinyint(4) NULL, + `c_smallint` smallint(6) NULL, + `c_int` int(11) NULL, + `c_bigint` bigint(20) NULL, + `c_largeint` largeint(40) NULL, + `c_float` float NULL, + `c_double` double NULL, + `c_decimal` decimal(20, 3) NULL, + `c_decimalv3` decimalv3(20, 3) NULL, + `c_date` date NULL, + `c_datetime` datetime NULL, + `c_datev2` datev2 NULL, + `c_datetimev2` datetimev2(0) NULL, + `c_char` char(15) NULL, + `c_varchar` varchar(100) NULL, + `c_string` text NULL + ) ENGINE=OLAP + DUPLICATE KEY(`k1`) + COMMENT 'OLAP' + DISTRIBUTED BY HASH(`k1`) BUCKETS 10 + PROPERTIES("replication_num" = "1"); + """ + + // load data + streamLoad { + table scala_table_dup + file dataFile + time 60000 + + check { result, exception, startTime, endTime -> + if (exception != null) { + throw exception + } + log.info("Stream load result: ${result}".toString()) + def json = parseJson(result) + assertEquals(100, json.NumberTotalRows) + assertEquals(100, json.NumberLoadedRows) + } + } + + // insert two NULL rows + sql """INSERT INTO ${scala_table_dup} VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)""" + sql """INSERT INTO ${scala_table_dup} VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL)""" + + + // define dup key table with nested table types with one nested scala + def nested_table_dup = "tbl_array_nested_types_dup" + sql "DROP TABLE IF EXISTS ${nested_table_dup}" + sql """ + CREATE TABLE IF NOT EXISTS ${nested_table_dup} ( + `k1` bigint(11) NULL, + `c_bool` array NULL, + `c_tinyint` array NULL, + `c_smallint` array NULL, + `c_int` array NULL, + `c_bigint` array NULL, + `c_largeint` array NULL, + `c_float` array NULL, + `c_double` array NULL, + `c_decimal` array NULL, + `c_decimalv3` array NULL, + `c_date` array NULL, + `c_datetime` array NULL, + `c_datev2` array NULL, + `c_datetimev2` array NULL, + `c_char` array NULL, + `c_varchar` array NULL, + `c_string` array NULL + ) ENGINE=OLAP + DUPLICATE KEY(`k1`) + COMMENT 'OLAP' + DISTRIBUTED BY HASH(`k1`) BUCKETS 10 + PROPERTIES("replication_num" = "1"); + """ + + // define dup key table with nested table types with two nested scala + def nested_table_dup2 = "tbl_array_nested_types_dup2" + sql "DROP TABLE IF EXISTS ${nested_table_dup2}" + sql """ + CREATE TABLE IF NOT EXISTS ${nested_table_dup2} ( + `k1` bigint(11) NULL, + `c_bool` array> NULL, + `c_tinyint` array> NULL, + `c_smallint` array> NULL, + `c_int` array> NULL, + `c_bigint` array> NULL, + `c_largeint` array> NULL, + `c_float` array> NULL, + `c_double` array> NULL, + `c_decimal` array> NULL, + `c_decimalv3` array> NULL, + `c_date` array> NULL, + `c_datetime` array> NULL, + `c_datev2` array> NULL, + `c_datetimev2` array> NULL, + `c_char` array> NULL, + `c_varchar` array> NULL, + `c_string` array> NULL + ) ENGINE=OLAP + DUPLICATE KEY(`k1`) + COMMENT 'OLAP' + DISTRIBUTED BY HASH(`k1`) BUCKETS 10 + PROPERTIES("replication_num" = "1"); + """ + + // define dup key table with map types with one nested scala + def nested_table_map_dup = "tbl_map_types_dup" + sql "DROP TABLE IF EXISTS ${nested_table_map_dup}" + sql """ + CREATE TABLE IF NOT EXISTS ${nested_table_map_dup} ( + `k1` bigint(11) NULL, + `c_bool` map NULL, + `c_tinyint` map NULL, + `c_smallint` map NULL, + `c_int` map NULL, + `c_bigint` map NULL, + `c_largeint` map NULL, + `c_float` map NULL, + `c_double` map NULL, + `c_decimal` map NULL, + `c_decimalv3` map NULL, + `c_date` map NULL, + `c_datetime` map NULL, + `c_datev2` map NULL, + `c_datetimev2` map NULL, + `c_char` map NULL, + `c_varchar` map NULL, + `c_string` map NULL + ) ENGINE=OLAP + DUPLICATE KEY(`k1`) + COMMENT 'OLAP' + DISTRIBUTED BY HASH(`k1`) BUCKETS 10 + PROPERTIES("replication_num" = "1"); + """ + + + // define dup key table with array nested map table types with one nested scala + def nested_table_array_map_dup = "tbl_array_map_types_dup" + sql "DROP TABLE IF EXISTS ${nested_table_array_map_dup}" + sql """ + CREATE TABLE IF NOT EXISTS ${nested_table_array_map_dup} ( + `k1` bigint(11) NULL, + `c_bool` array> NULL, + `c_tinyint` array> NULL, + `c_smallint` array> NULL, + `c_int` array> NULL, + `c_bigint` array> NULL, + `c_largeint` array> NULL, + `c_float` array> NULL, + `c_double` array> NULL, + `c_decimal` array> NULL, + `c_decimalv3` array> NULL, + `c_date` array> NULL, + `c_datetime` array> NULL, + `c_datev2` array> NULL, + `c_datetimev2` array> NULL, + `c_char` array> NULL, + `c_varchar` array> NULL, + `c_string` array> NULL + ) ENGINE=OLAP + DUPLICATE KEY(`k1`) + COMMENT 'OLAP' + DISTRIBUTED BY HASH(`k1`) BUCKETS 10 + PROPERTIES("replication_num" = "1"); + """ + + // define dup key table with map nested value array table types with one nested scala + def nested_table_map_array_dup = "tbl_map_array_types_dup" + sql "DROP TABLE IF EXISTS ${nested_table_map_array_dup}" + sql """ + CREATE TABLE IF NOT EXISTS ${nested_table_map_array_dup} ( + `k1` bigint(11) NULL, + `c_bool` map> NULL, + `c_tinyint` map> NULL, + `c_smallint` map> NULL, + `c_int` map> NULL, + `c_bigint` map> NULL, + `c_largeint` map> NULL, + `c_float` map> NULL, + `c_double` map> NULL, + `c_decimal` map> NULL, + `c_decimalv3` map> NULL, + `c_date` map> NULL, + `c_datetime` map> NULL, + `c_datev2` map> NULL, + `c_datetimev2` map> NULL, + `c_char` map> NULL, + `c_varchar` map> NULL, + `c_string` map> NULL + ) ENGINE=OLAP + DUPLICATE KEY(`k1`) + COMMENT 'OLAP' + DISTRIBUTED BY HASH(`k1`) BUCKETS 10 + PROPERTIES("replication_num" = "1"); + """ + + // test action for scala to array with scala type + // current we support char family to insert nested type + test { + sql "insert into ${nested_table_dup} (c_bool) select c_bool from ${scala_table_dup}" + exception "java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY" + } + + test { + sql "insert into ${nested_table_dup} (c_tinyint) select c_tinyint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY") + } + + test { + sql "insert into ${nested_table_dup} (c_smallint) select c_smallint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY") + } + + test { + sql "insert into ${nested_table_dup} (c_int) select c_int from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY") + } + + test { + sql "insert into ${nested_table_dup} (c_largeint) select c_largeint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY") + } + + test { + sql "insert into ${nested_table_dup} (c_float) select c_float from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY") + } + + test { + sql "insert into ${nested_table_dup} (c_double) select c_double from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY") + } + + test { + sql "insert into ${nested_table_dup} (c_decimal) select c_decimal from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY") + } + + test { + sql "insert into ${nested_table_dup} (c_decimalv3) select c_decimalv3 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY") + } + + test { + sql "insert into ${nested_table_dup} (c_date) select c_date from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY") + } + + test { + sql "insert into ${nested_table_dup} (c_datetime) select c_datetime from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY") + } + + test { + sql "insert into ${nested_table_dup} (c_datev2) select c_datev2 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY") + } + + test { + sql "insert into ${nested_table_dup} (c_datetimev2) select c_datetimev2 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY") + } + + test { + sql "insert into ${nested_table_dup} (c_char) select c_char from ${scala_table_dup}" + exception null + } + + test { + sql "insert into ${nested_table_dup} (c_varchar) select c_varchar from ${scala_table_dup}" + exception null + } + + test { + sql "insert into ${nested_table_dup} (c_string) select c_string from ${scala_table_dup}" + exception null + } + + qt_sql_nested_table_dup_c """select count() from ${nested_table_dup};""" + + // test action for scala to array with array-scala type + test { + sql "insert into ${nested_table_dup2} (c_bool) select c_bool from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_tinyint) select c_tinyint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_smallint) select c_smallint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_int) select c_int from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_largeint) select c_largeint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_float) select c_float from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_double) select c_double from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_decimal) select c_decimal from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_decimalv3) select c_decimalv3 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_date) select c_date from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_datetime) select c_datetime from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_datev2) select c_datev2 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_datetimev2) select c_datetimev2 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_dup2} (c_char) select c_char from ${scala_table_dup}" + exception null + } + + test { + sql "insert into ${nested_table_dup2} (c_varchar) select c_varchar from ${scala_table_dup}" + exception null + } + + test { + sql "insert into ${nested_table_dup2} (c_string) select c_string from ${scala_table_dup}" + exception null + } + + qt_sql_nested_table_dup2_c """select count() from ${nested_table_dup2};""" + + + // test action for scala to map with map-scala-scala type + test { + sql "insert into ${nested_table_map_dup} (c_bool) select c_bool from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_tinyint) select c_tinyint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_smallint) select c_smallint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_int) select c_int from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_largeint) select c_largeint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_float) select c_float from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_double) select c_double from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_decimal) select c_decimal from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_decimalv3) select c_decimalv3 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_date) select c_date from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_datetime) select c_datetime from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_datev2) select c_datev2 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_datetimev2) select c_datetimev2 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP") + } + + test { + sql "insert into ${nested_table_map_dup} (c_char) select c_char from ${scala_table_dup}" + exception null + } + + test { + sql "insert into ${nested_table_map_dup} (c_varchar) select c_varchar from ${scala_table_dup}" + exception null + } + + test { + sql "insert into ${nested_table_map_dup} (c_string) select c_string from ${scala_table_dup}" + exception null + } + + qt_sql_nested_table_map_dup_c """select count() from ${nested_table_map_dup};""" + + // test action for scala to array with map-scala-scala type + test { + sql "insert into ${nested_table_array_map_dup} (c_bool) select c_bool from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_tinyint) select c_tinyint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_smallint) select c_smallint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_int) select c_int from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_largeint) select c_largeint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_float) select c_float from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_double) select c_double from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_decimal) select c_decimal from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_decimalv3) select c_decimalv3 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_date) select c_date from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_datetime) select c_datetime from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_datev2) select c_datev2 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_datetimev2) select c_datetimev2 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_char) select c_char from ${scala_table_dup}" + exception null + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_varchar) select c_varchar from ${scala_table_dup}" + exception null + } + + test { + sql "insert into ${nested_table_array_map_dup} (c_string) select c_string from ${scala_table_dup}" + exception null + } + + qt_sql_nested_table_array_map_dup_c """select count() from ${nested_table_array_map_dup};""" + + // test action for map with scala array-scala + // test action for scala to array with array-scala type + test { + sql "insert into ${nested_table_map_array_dup} (c_bool) select c_bool from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_tinyint) select c_tinyint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_smallint) select c_smallint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_int) select c_int from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_largeint) select c_largeint from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_float) select c_float from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_double) select c_double from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_decimal) select c_decimal from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_decimalv3) select c_decimalv3 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_date) select c_date from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_datetime) select c_datetime from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_datev2) select c_datev2 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_datetimev2) select c_datetimev2 from ${scala_table_dup}" + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP>") + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_char) select c_char from ${scala_table_dup}" + exception null + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_varchar) select c_varchar from ${scala_table_dup}" + exception null + } + + test { + sql "insert into ${nested_table_map_array_dup} (c_string) select c_string from ${scala_table_dup}" + exception null + } + + qt_sql_nested_table_map_array_dup_c """select count() from ${nested_table_map_array_dup};""" + +}