|
110 | 110 |
|
111 | 111 | # Copy to directory as partitioned files
|
112 | 112 | query I
|
113 |
| -COPY (values (1::int, 2::bigint, 19968::date, arrow_cast(1725235200000, 'Date64'), false, 'x'), |
114 |
| - (11::int, 22::bigint, 19969::date, arrow_cast(1725148800000, 'Date64'), true, 'y') |
| 113 | +COPY (values (arrow_cast(1, 'Int8'), arrow_cast(2, 'UInt8'), arrow_cast(3, 'Int16'), arrow_cast(4, 'UInt16'), |
| 114 | + arrow_cast(5, 'Int32'), arrow_cast(6, 'UInt32'), arrow_cast(7, 'Int64'), arrow_cast(8, 'UInt64'), |
| 115 | + arrow_cast(9.1015625, 'Float16'), arrow_cast(10.1, 'Float32'), arrow_cast(11.1, 'Float64'), 19968::date, |
| 116 | + arrow_cast(1725235200000, 'Date64'), false, 'x'), |
| 117 | + (arrow_cast(11, 'Int8'), arrow_cast(22, 'UInt8'), arrow_cast(33, 'Int16'), arrow_cast(44, 'UInt16'), |
| 118 | + arrow_cast(55, 'Int32'), arrow_cast(66, 'UInt32'), arrow_cast(77, 'Int64'), arrow_cast(88, 'UInt64'), |
| 119 | + arrow_cast(9.203125, 'Float16'), arrow_cast(10.2, 'Float32'), arrow_cast(11.2, 'Float64'), 19969::date, |
| 120 | + arrow_cast(1725148800000, 'Date64'), true, 'y') |
115 | 121 | )
|
116 |
| -TO 'test_files/scratch/copy/partitioned_table5/' STORED AS parquet PARTITIONED BY (column1, column2, column3, column4, column5) |
| 122 | +TO 'test_files/scratch/copy/partitioned_table5/' STORED AS parquet PARTITIONED BY (column1, column2, column3, column4, |
| 123 | + column5, column6, column7, column8, column9, column10, column11, column12, column13, column14) |
117 | 124 | OPTIONS ('format.compression' 'zstd(10)');
|
118 | 125 | ----
|
119 | 126 | 2
|
120 | 127 |
|
121 | 128 | # validate partitioning
|
122 | 129 | statement ok
|
123 |
| -CREATE EXTERNAL TABLE validate_partitioned_parquet5 (column1 int, column2 bigint, column3 date, column4 date, column5 boolean, column6 varchar) STORED AS PARQUET |
124 |
| -LOCATION 'test_files/scratch/copy/partitioned_table5/' PARTITIONED BY (column1, column2, column3, column4, column5); |
125 |
| - |
126 |
| -query IIDDBT |
127 |
| -select column1, column2, column3, column4, column5, column6 from validate_partitioned_parquet5 order by column1,column2,column3,column4,column5; |
128 |
| ----- |
129 |
| -1 2 2024-09-02 2024-09-02 false x |
130 |
| -11 22 2024-09-03 2024-09-01 true y |
| 130 | +CREATE EXTERNAL TABLE validate_partitioned_parquet5 (column1 int, column2 int, column3 int, column4 int, column5 int, |
| 131 | + column6 int, column7 bigint, column8 bigint, column9 float, column10 float, column11 float, column12 date, |
| 132 | + column13 date, column14 boolean, column15 varchar) STORED AS PARQUET |
| 133 | +LOCATION 'test_files/scratch/copy/partitioned_table5/' PARTITIONED BY (column1, column2, column3, column4, column5, |
| 134 | + column6, column7, column8, column9, column10, column11, column12, column13, column14); |
| 135 | + |
| 136 | +query IIIIIIIIRRRDDBT |
| 137 | +select column1, column2, column3, column4, column5, column6, column7, column8, column9, column10, column11, column12, |
| 138 | + column13, column14, column15 from validate_partitioned_parquet5 order by column1, column2, column3, column4, |
| 139 | + column5, column6, column7, column8, column9, column10, column11, column12, column13; |
| 140 | +---- |
| 141 | +1 2 3 4 5 6 7 8 9.1015625 10.1 11.1 2024-09-02 2024-09-02 false x |
| 142 | +11 22 33 44 55 66 77 88 9.203125 10.2 11.2 2024-09-03 2024-09-01 true y |
131 | 143 |
|
132 | 144 |
|
133 | 145 | statement ok
|
|
0 commit comments