mirror of
https://github.com/CartoDB/crankshaft.git
synced 2024-11-01 10:20:48 +08:00
update order of query gen
This commit is contained in:
parent
cc0a683a26
commit
bb5de09d6d
@ -46,9 +46,9 @@ class AnalysisDataProvider:
|
||||
|
||||
def get_nonspatial_kmeans(self, params):
|
||||
"""fetch data for non-spatial kmeans"""
|
||||
agg_cols = ', '.join(['array_agg({0}) As arr_col{1}'.format(idx+1, val)
|
||||
agg_cols = ', '.join(['array_agg({0}) As arr_col{1}'.format(val, idx+1)
|
||||
for idx, val in enumerate(params['colnames'])])
|
||||
|
||||
print agg_cols
|
||||
query = '''
|
||||
SELECT {cols}, array_agg({id_col}) As rowid
|
||||
FROM ({subquery}) As a
|
||||
|
Loading…
Reference in New Issue
Block a user