1
0
mirror of https://github.com/cldellow/sqlite-parquet-vtable.git synced 2025-09-14 22:39:59 +00:00

Rewrite SQL oracle harness

This commit is contained in:
Colin Dellow
2018-03-07 20:20:34 -05:00
parent caefc23b1e
commit 35fcde926c
10 changed files with 20 additions and 31 deletions

View File

@@ -1,5 +1,4 @@
100-rows-1.parquet
SELECT rowid, bool_0, int8_1, int16_2, int32_3, int64_4, datetime(ts_5 / 1000, 'unixepoch'), printf("%.4f", double_6) AS double_6, string_7, string_8, quote(binary_9), quote(binary_10) FROM test;
SELECT rowid, bool_0, int8_1, int16_2, int32_3, int64_4, datetime(ts_5 / 1000, 'unixepoch'), printf("%.4f", double_6) AS double_6, string_7, string_8, quote(binary_9), quote(binary_10) FROM no_nulls1;
0|1|50|5000|50000000|50000000000|1985-07-20 00:00:00|100.0000|0|000|X'00'|X'00'
1|0|49|4900|49000000|49000000000|1985-07-21 00:00:00|50.0000|1|001|X'0101'|X'01'
2|1|48|4800|48000000|48000000000|1985-07-22 00:00:00|33.3333|2|002|X'020202'|X'02'

View File

@@ -1,5 +1,4 @@
100-rows-10.parquet
SELECT rowid, bool_0, int8_1, int16_2, int32_3, int64_4, datetime(ts_5 / 1000, 'unixepoch'), printf("%.4f", double_6) AS double_6, string_7, string_8, quote(binary_9), quote(binary_10) FROM test;
SELECT rowid, bool_0, int8_1, int16_2, int32_3, int64_4, datetime(ts_5 / 1000, 'unixepoch'), printf("%.4f", double_6) AS double_6, string_7, string_8, quote(binary_9), quote(binary_10) FROM no_nulls2;
0|1|50|5000|50000000|50000000000|1985-07-20 00:00:00|100.0000|0|000|X'00'|X'00'
1|0|49|4900|49000000|49000000000|1985-07-21 00:00:00|50.0000|1|001|X'0101'|X'01'
2|1|48|4800|48000000|48000000000|1985-07-22 00:00:00|33.3333|2|002|X'020202'|X'02'

View File

@@ -1,3 +1,2 @@
100-rows-1.parquet
select count(*) from (select * from test t1, test t2);
select count(*) from (select * from no_nulls1 t1, no_nulls1 t2);
10000

View File

@@ -1,3 +1,2 @@
100-rows-10.parquet
select count(*) from (select * from test t1, test t2);
select count(*) from (select * from no_nulls2 t1, no_nulls2 t2);
10000

View File

@@ -1,3 +1,2 @@
100-rows-1.parquet
select int8_1 from test where rowid = 50;
select int8_1 from no_nulls1 where rowid = 50;
0

View File

@@ -1,3 +1,2 @@
100-rows-10.parquet
select int8_1 from test where rowid = 50;
select int8_1 from no_nulls2 where rowid = 50;
0

View File

@@ -1,3 +1,2 @@
100-rows-10.parquet
select int8_1 from test where rowid = 55;
select int8_1 from no_nulls2 where rowid = 55;
-5

View File

@@ -1,3 +1,2 @@
100-rows-nulls.parquet
SELECT SUM(CASE WHEN bool_0 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN int8_1 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN int16_2 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN int32_3 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN int64_4 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN ts_5 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN double_6 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN string_7 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN string_8 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN binary_9 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN binary_10 IS NULL THEN 1 ELSE 0 END) from test;
SELECT SUM(CASE WHEN bool_0 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN int8_1 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN int16_2 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN int32_3 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN int64_4 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN ts_5 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN double_6 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN string_7 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN string_8 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN binary_9 IS NULL THEN 1 ELSE 0 END), SUM(CASE WHEN binary_10 IS NULL THEN 1 ELSE 0 END) from nulls;
50|50|50|50|50|50|50|50|50|50|50