-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Fix mvt error when returning partial results #98765
Conversation
Pinging @elastic/es-analytics-geo (Team:Analytics) |
Hi @iverase, I've created a changelog YAML for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, although I wonder why Maps.flatten does not do the job
@@ -64,6 +64,10 @@ public static void addPropertyToFeature(VectorTile.Tile.Feature.Builder feature, | |||
// guard for null values | |||
return; | |||
} | |||
if (value instanceof Map<?, ?> map) { | |||
// maps should have been flattened already in Maps#flatten but still contains the original maps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maps.flatten does include recursive code for this, so it is surprising it does not happen. Perhaps there is a bug in Maps.flatten.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe but it is used in other places and I thought it was too risky to mess with it. I will check and open an issue if necessary
This PR adds the logic to ignore map objects when adding properties to a tile
This PR adds the logic to ignore map objects when adding properties to a tile
This PR adds the logic to ignore map objects when adding properties to a tile
In #97619, we make stricter the parsing of the query result and we throw an error when we cannot add part of the result to the vector tile. This had an undesirable side effect because the flattened method used to generate tags for the vector tile keeps the original maps.
This PR adds the logic to be able to ignore map objects when adding properties to the tile
fixes #98730