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):
|
||||
self.athena = athena
|
||||
self.dest = dest
|
||||
self.data = list(data)
|
||||
self.n = n
|
||||
self.tables = []
|
||||
self.queries = []
|
||||
self.runtime = 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):
|
||||
self.queries.append(res)
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ parallel off
|
|||
manifest;
|
||||
drop table temp_data;
|
||||
"""
|
||||
print(query)
|
||||
return query
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue