You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm noticing that when there is an ORDER BY in a query, that the features aren't drawing as expected. Is this expected behavior?
For example, in the screenshot below, each symbol is colored and sized by an attribute avg_waiting_time where the query orders by avg_waiting_time desc what I would expect to see (and what I see in Builder) is the smaller points to draw on top of the larger ones. As you can see where the central large red circles are, that isn't being respected as there are several smaller points still drawing underneath the larger ones:
Even if I add order: width(desc)
It still doesn't change the viz:
Just in case, the full query for the dataset (client project so can't share map in public repo):
SELECT CONNECTION_NAME,
sum(occupancy) AS occupancy,
avg(avg_waiting_time) AS avg_waiting_time,
the_geom,
the_geom_webmercator,
row_number() over() AS cartodb_id,
hour
FROM table
WHERE avg_waiting_time > 0
AND trip_date >= '2018-07-18'
AND trip_date < '2018-07-19'
GROUP BY CONNECTION_NAME,
hour,
the_geom,
the_geom_webmercator
ORDER BY avg_waiting_time DESC
The text was updated successfully, but these errors were encountered:
I think this is expected behavior due to the way Maps API works.
Yes, but that doesn't mean that CartoVL has to work this way.
To put this in context: Mapnik doesn't have any guarantee about where to start rendering because queries don't have any order and it renders them in the order they arrive.
On the other hand, for MVTs:
If using the Mapnik renderer: features should be ordered correctly (as the generation is sequential).
If using the pg-mvt (aka St_AsMVT) renderer: features won't be ordered if a parallel plan is triggered, but they will be if processed sequentially.
Either way, even if they reach the client unordered, they could be ordered before rendering. It's should be simple (but costly as it requires reading all properties).
Related to: #20
I'm noticing that when there is an ORDER BY in a query, that the features aren't drawing as expected. Is this expected behavior?
For example, in the screenshot below, each symbol is colored and sized by an attribute
avg_waiting_time
where the query orders byavg_waiting_time desc
what I would expect to see (and what I see in Builder) is the smaller points to draw on top of the larger ones. As you can see where the central large red circles are, that isn't being respected as there are several smaller points still drawing underneath the larger ones:Even if I add
order: width(desc)
It still doesn't change the viz:
Just in case, the full query for the dataset (client project so can't share map in public repo):
The text was updated successfully, but these errors were encountered: