forked from bellwether/minerva
oops. bugfix
This commit is contained in:
parent
e294fc062b
commit
fd289257aa
2 changed files with 8 additions and 1 deletions
|
|
@ -227,13 +227,19 @@ class Parallelize:
|
||||||
def __init__(self, athena, dest=None, data=[], n=1):
|
def __init__(self, athena, dest=None, data=[], n=1):
|
||||||
self.athena = athena
|
self.athena = athena
|
||||||
self.dest = dest
|
self.dest = dest
|
||||||
self.data = list(data)
|
|
||||||
self.n = n
|
self.n = n
|
||||||
self.tables = []
|
self.tables = []
|
||||||
self.queries = []
|
self.queries = []
|
||||||
self.runtime = None
|
self.runtime = None
|
||||||
self.cost = None
|
self.cost = None
|
||||||
|
|
||||||
|
if type(data) == type(1):
|
||||||
|
self.data = list(range(data))
|
||||||
|
elif type(data) == type([]) or data.__iter__:
|
||||||
|
self.data = list(data)
|
||||||
|
else:
|
||||||
|
raise Exception(f"Passed in {type(data)}, expected list-like or integer")
|
||||||
|
|
||||||
|
|
||||||
def __lshift__(self, res):
|
def __lshift__(self, res):
|
||||||
self.queries.append(res)
|
self.queries.append(res)
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,7 @@ parallel off
|
||||||
manifest;
|
manifest;
|
||||||
drop table temp_data;
|
drop table temp_data;
|
||||||
"""
|
"""
|
||||||
|
print(query)
|
||||||
return query
|
return query
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue