fix perftest to work with renamed core functions
This commit is contained in:
parent
7c093741dc
commit
267af19911
@ -295,11 +295,11 @@ def test_getmeasure_split_performance(geom_complexity, normalization, geom, boun
|
|||||||
for rows in rownums:
|
for rows in rownums:
|
||||||
stmt = '''
|
stmt = '''
|
||||||
with data as (
|
with data as (
|
||||||
SELECT * FROM {schema}{api_method}datamulti(
|
SELECT id, data FROM {schema}OBS_GetData(
|
||||||
(SELECT array_agg(({geom}, cartodb_id)::geomval)
|
(SELECT array_agg(({geom}, cartodb_id)::geomval)
|
||||||
FROM obs_perftest_{complexity}
|
FROM obs_perftest_{complexity}
|
||||||
WHERE cartodb_id <= {n}),
|
WHERE cartodb_id <= {n}),
|
||||||
(SELECT {schema}{api_method}metamulti(
|
(SELECT {schema}OBS_GetMeta(
|
||||||
(SELECT st_setsrid(st_extent({geom}), 4326)
|
(SELECT st_setsrid(st_extent({geom}), 4326)
|
||||||
FROM obs_perftest_{complexity}
|
FROM obs_perftest_{complexity}
|
||||||
WHERE cartodb_id <= {n}),
|
WHERE cartodb_id <= {n}),
|
||||||
@ -309,18 +309,16 @@ with data as (
|
|||||||
"geom_id": {boundary}
|
"geom_id": {boundary}
|
||||||
}}]'::JSON
|
}}]'::JSON
|
||||||
))
|
))
|
||||||
)
|
))
|
||||||
AS x(cartodb_id INTEGER, measure Numeric))
|
|
||||||
UPDATE obs_perftest_{complexity}
|
UPDATE obs_perftest_{complexity}
|
||||||
SET measure = data.measure
|
SET measure = (data->0->>'value')::Numeric
|
||||||
FROM data
|
FROM data
|
||||||
WHERE obs_perftest_{complexity}.cartodb_id = data.cartodb_id
|
WHERE obs_perftest_{complexity}.cartodb_id = data.id
|
||||||
;
|
;
|
||||||
'''.format(
|
'''.format(
|
||||||
point_or_poly='point' if geom == 'point' else 'polygon',
|
point_or_poly='point' if geom == 'point' else 'polygon',
|
||||||
complexity=geom_complexity,
|
complexity=geom_complexity,
|
||||||
schema='cdb_observatory.' if USE_SCHEMA else '',
|
schema='cdb_observatory.' if USE_SCHEMA else '',
|
||||||
api_method='obs_getmeasure',
|
|
||||||
normalization=normalization,
|
normalization=normalization,
|
||||||
geom=geom,
|
geom=geom,
|
||||||
boundary=boundary.replace("'", '"'),
|
boundary=boundary.replace("'", '"'),
|
||||||
|
Loading…
Reference in New Issue
Block a user