Skip to content

Commit 310a879

Browse files
committed
fix(cluster): add copy into test
1 parent 32faa14 commit 310a879

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
statement ok
2+
DROP DATABASE IF EXISTS db1;
3+
4+
statement ok
5+
CREATE DATABASE db1;
6+
7+
statement ok
8+
USE db1;
9+
10+
statement ok
11+
CREATE TABLE test_table(id INTEGER, name VARCHAR, age INT);
12+
13+
statement ok
14+
insert into test_table (id,name,age) values(1,'2',3), (4, '5', 6);
15+
16+
statement ok
17+
CREATE STAGE IF NOT EXISTS test;
18+
19+
statement ok
20+
copy into @test from test_table FILE_FORMAT = (type = 'CSV');
21+
22+
statement ok
23+
copy into test_table from @test;
24+
25+
statement query A
26+
SELECT COUNT() FROM test_table;
27+
28+
----
29+
4
30+
31+
statement ok
32+
drop table test_table all;
33+
34+
statement ok
35+
drop stage test;
36+
37+
statement ok
38+
DROP DATABASE db1;

0 commit comments

Comments
 (0)