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
Hi, I'm proposing to add an optional minimum resolution to the compactcells function. Currently the function always tries to compact up to resolution 0. For database joins where range queries are inefficient we need to join on equality at an intermediary resolution then post filter for exact min/max checks at a higher resolution.
For example in this databricks article they do a join using parent resolution 8 but this requires that no cells got compacted to a lower resolution than 8.
SELECT
FROM
trip_h3 as t,
(SELECT
h3_toparent(c_cell, 8) AS cell_8, *
FROM taxi_zone_h3c_explode) AS tz
WHERE
(tz.h3_res = 8 AND t.pickup_cell_8 = tz.cell_8) OR
(t.pickup_cell_8 = tz.cell_8 AND h3_ischildof(t.pickup_cell, tz.c_cell))
(sql query from the article)
If we want to "limit" the minimum resolution of the compacted cells currently we'd have to do something like
I think it would be a pretty minor change as the compact Cells function just hardcodes 0 as the min resolution right now. We could allow end users to specify their required min resolition.
Happy to contribute this myself as my first PR if you're open the feature.
The text was updated successfully, but these errors were encountered:
Hi, I'm proposing to add an optional minimum resolution to the compactcells function. Currently the function always tries to compact up to resolution 0. For database joins where range queries are inefficient we need to join on equality at an intermediary resolution then post filter for exact min/max checks at a higher resolution.
For example in this databricks article they do a join using parent resolution 8 but this requires that no cells got compacted to a lower resolution than 8.
(sql query from the article)
If we want to "limit" the minimum resolution of the compacted cells currently we'd have to do something like
(excuse my pseudocode :) )
I think it would be a pretty minor change as the compact Cells function just hardcodes 0 as the min resolution right now. We could allow end users to specify their required min resolition.
Happy to contribute this myself as my first PR if you're open the feature.
The text was updated successfully, but these errors were encountered: