mirror of
https://github.com/cldellow/sqlite-parquet-vtable.git
synced 2025-04-03 09:39:47 +00:00
Improve random query generation
...throw in the occasional `NOT`
This commit is contained in:
parent
373616ad1e
commit
5b26a78c1f
@ -47,7 +47,9 @@ def generate_statement(conn, table, column_values, all_values):
|
||||
if random.randint(0, 1) == 0:
|
||||
values = all_values
|
||||
value = values[random.randint(0, len(values) - 1)]
|
||||
query += field + ' ' + op + ' ' + str(value)
|
||||
if random.randint(0, 5) == 0:
|
||||
query += ' NOT '
|
||||
query += '(' + field + ' ' + op + ' ' + str(value) + ')'
|
||||
|
||||
if random.randint(0, 3) == 0:
|
||||
how_many = random.randint(0, 15)
|
||||
|
Loading…
x
Reference in New Issue
Block a user