1
0
mirror of https://github.com/cldellow/sqlite-parquet-vtable.git synced 2025-10-27 01:59:56 +00:00

Support float32

Fixes #32
This commit is contained in:
Colin Dellow
2018-07-05 19:48:14 -04:00
parent fd06ec5a23
commit 45ecf24a75
30 changed files with 472 additions and 443 deletions

View File

@@ -0,0 +1,2 @@
select float_11 from nulls where float_11 = 1.0
1.0

View File

@@ -0,0 +1 @@
select float_11 from nulls where float_11 = 123.0

View File

@@ -0,0 +1,2 @@
select float_11 from nulls where float_11 = '1'
1.0

View File

@@ -0,0 +1,2 @@
select count(*) from nulls where float_11 <> 1.0
49

View File

@@ -0,0 +1,2 @@
select count(*) from nulls where float_11 is null
49

View File

@@ -0,0 +1,2 @@
select count(*) from nulls where float_11 is not null
50

View File

@@ -0,0 +1,2 @@
select float_11 from nulls where float_11 >= 1.0
1.0

View File

@@ -0,0 +1 @@
select float_11 from nulls where float_11 > 1.0

View File

@@ -0,0 +1,2 @@
select float_11 from nulls where float_11 > 0.5
1.0

View File

@@ -0,0 +1,2 @@
select count(*) from nulls where float_11 < 0.0102
1

View File

@@ -0,0 +1,2 @@
select count(*) from nulls where float_11 < 0.001
0

View File

@@ -0,0 +1,2 @@
select count(*) from nulls where float_11 <= 0.0102
1

View File

@@ -84,7 +84,9 @@ def test_statement(conn, table, column_values, all_values):
def test_table(conn, table):
column_names = get_columns(conn, table)
# Don't include the floating point columns in random tests - sqlite itself stores doubles, so
# it can't act as an oracle for the FP stuff.
column_names = [x for x in get_columns(conn, table) if not x.startswith('float_')]
print('Table {}: {}'.format(table, column_names))
column_values = {}
for name in column_names:
@@ -94,7 +96,6 @@ def test_table(conn, table):
all_values = []
for values in column_values.values():
all_values = all_values + values
print(all_values)
for i in range(1000):
test_statement(conn, table, column_values, all_values)