-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Various fixes to spatial functions (ST_ENVELOPE and ST_NPOINTS) #139618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Various fixes to spatial functions (ST_ENVELOPE and ST_NPOINTS) #139618
Conversation
* Made ST_ENVELOPE multi-value aware * Added ST_NPOINTS * Refactored doc-values support (so ST_ENVELOPE, ST_NPOINTS and all geogrid functions are similar)
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
|
Hi @craigtaverner, I've created a changelog YAML for you. |
🔍 Preview links for changed docs |
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
And write a test that shows this working
|
Hi @craigtaverner, I've updated the changelog YAML for you. |
Various fixes to spatial functions:
This last point is interesting. Because ST_X and ST_Y use @ConvertEvaluator, they support multi-values by converting each internal value, which makes sense for points, since we cannot collect points into a MultiPoint and perform ST_X/ST_Y on the multipoint. However, for ST_XMAX, ST_XMIN, ST_YMAX and ST_YMIN we can follow the convention we are using elsewhere in spatial functions, and collect the multi-values into a geometry collection. This means that, for example, ST_XMAX(field) will return the maximum x value for all values in the multi-value, whether they are points, shapes or a mixture.
Checklist: