mirror of
https://github.com/cldellow/sqlite-parquet-vtable.git
synced 2025-10-27 01:59:56 +00:00
2
tests/templates/143-float-eq.sql
Normal file
2
tests/templates/143-float-eq.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
select float_11 from nulls where float_11 = 1.0
|
||||
1.0
|
||||
1
tests/templates/144-float-eq2.sql
Normal file
1
tests/templates/144-float-eq2.sql
Normal file
@@ -0,0 +1 @@
|
||||
select float_11 from nulls where float_11 = 123.0
|
||||
2
tests/templates/145-float-eq3.sql
Normal file
2
tests/templates/145-float-eq3.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
select float_11 from nulls where float_11 = '1'
|
||||
1.0
|
||||
2
tests/templates/146-float-ne.sql
Normal file
2
tests/templates/146-float-ne.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
select count(*) from nulls where float_11 <> 1.0
|
||||
49
|
||||
2
tests/templates/147-float-is-null.sql
Normal file
2
tests/templates/147-float-is-null.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
select count(*) from nulls where float_11 is null
|
||||
49
|
||||
2
tests/templates/148-float-is-not-null.sql
Normal file
2
tests/templates/148-float-is-not-null.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
select count(*) from nulls where float_11 is not null
|
||||
50
|
||||
2
tests/templates/149-float-gte.sql
Normal file
2
tests/templates/149-float-gte.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
select float_11 from nulls where float_11 >= 1.0
|
||||
1.0
|
||||
1
tests/templates/150-float-gt.sql
Normal file
1
tests/templates/150-float-gt.sql
Normal file
@@ -0,0 +1 @@
|
||||
select float_11 from nulls where float_11 > 1.0
|
||||
2
tests/templates/151-float-gt-2.sql
Normal file
2
tests/templates/151-float-gt-2.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
select float_11 from nulls where float_11 > 0.5
|
||||
1.0
|
||||
2
tests/templates/152-float-lt.sql
Normal file
2
tests/templates/152-float-lt.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
select count(*) from nulls where float_11 < 0.0102
|
||||
1
|
||||
2
tests/templates/153-float-lt.sql
Normal file
2
tests/templates/153-float-lt.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
select count(*) from nulls where float_11 < 0.001
|
||||
0
|
||||
2
tests/templates/154-float-lte.sql
Normal file
2
tests/templates/154-float-lte.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
select count(*) from nulls where float_11 <= 0.0102
|
||||
1
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user