CartoDB / observatory-extension

BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

OBS_GetAvailableGeometries now receives number of geometries from input #313

Closed ethervoid closed 6 years ago

ethervoid commented 6 years ago

We need the number of geometries to pass them to the get score function in order to get an accurate score for the input in order to suggest what is the geometry that fits better for the input we have

javitonino commented 6 years ago

While looking at how DS API and this fits, we need to use something a bit better for the default. Either we accept NULL here and COALESCE to 3000, or we put 3000 as a default in DS API. https://github.com/CartoDB/dataservices-api/pull/403#pullrequestreview-68308145

javitonino commented 6 years ago

Uhm, _GetGeometryScores already has the default coalesce: https://github.com/CartoDB/observatory-extension/blob/develop/src/pg/sql/42_observatory_exploration.sql#L541-L543

So maybe we can remove the 3000 default from here, and that's it.

ethervoid commented 6 years ago

Yes, I'd remove the default 3000 and change for NULL in the OBS_GetAvailableGeometries function