Rebase keyed JSON ordinals to start from zero.#41282
Merged
jtibshirani merged 5 commits intoelastic:object-fieldsfrom Apr 17, 2019
Merged
Rebase keyed JSON ordinals to start from zero.#41282jtibshirani merged 5 commits intoelastic:object-fieldsfrom
jtibshirani merged 5 commits intoelastic:object-fieldsfrom
Conversation
Collaborator
|
Pinging @elastic/es-search |
jimczi
approved these changes
Apr 17, 2019
Contributor
jimczi
left a comment
There was a problem hiding this comment.
It looks great, thanks for iterating @jtibshirani
jpountz
approved these changes
Apr 17, 2019
| public OrdinalMap getOrdinalMap() { | ||
| return delegate.getOrdinalMap(); | ||
| throw new UnsupportedOperationException("Keyed JSON field data does not allow access to the" + | ||
| " underlying ordinal map."); |
Contributor
There was a problem hiding this comment.
can you add the field name to the error message to make it easier to debug?
|
|
||
| /** | ||
| * Whether this values source is able to provide a mapping between global and segment ordinals, | ||
| * by returning the underlying {@link OrdinalMap}. If this method returnns false, then calling |
Contributor
Author
|
@elasticmachine run elasticsearch-ci/1 |
11 tasks
jtibshirani
added a commit
that referenced
this pull request
May 1, 2019
This PR updates `KeyedJsonAtomicFieldData` to always return ordinals in the range `[0, (maxOrd - minOrd)]`, which is necessary for certain aggregations and sorting options to be supported. As discussed in #41220, I opted not to support `KeyedIndexFieldData#getOrdinalMap`, as it would add substantial complexity. The one place this affects is the 'low cardinality' optimization for terms aggregations, which now needs to be disabled for keyed JSON fields. It was fairly difficult to incorporate this change, and I have a couple follow-up refactors in mind to help simplify the global ordinals code. (I will likely wait until this feature branch is merged though before opening PRs on master).
jtibshirani
added a commit
that referenced
this pull request
May 24, 2019
This PR updates `KeyedJsonAtomicFieldData` to always return ordinals in the range `[0, (maxOrd - minOrd)]`, which is necessary for certain aggregations and sorting options to be supported. As discussed in #41220, I opted not to support `KeyedIndexFieldData#getOrdinalMap`, as it would add substantial complexity. The one place this affects is the 'low cardinality' optimization for terms aggregations, which now needs to be disabled for keyed JSON fields. It was fairly difficult to incorporate this change, and I have a couple follow-up refactors in mind to help simplify the global ordinals code. (I will likely wait until this feature branch is merged though before opening PRs on master).
jtibshirani
added a commit
that referenced
this pull request
May 29, 2019
This PR updates `KeyedJsonAtomicFieldData` to always return ordinals in the range `[0, (maxOrd - minOrd)]`, which is necessary for certain aggregations and sorting options to be supported. As discussed in #41220, I opted not to support `KeyedIndexFieldData#getOrdinalMap`, as it would add substantial complexity. The one place this affects is the 'low cardinality' optimization for terms aggregations, which now needs to be disabled for keyed JSON fields. It was fairly difficult to incorporate this change, and I have a couple follow-up refactors in mind to help simplify the global ordinals code. (I will likely wait until this feature branch is merged though before opening PRs on master).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates
KeyedJsonAtomicFieldDatato always return ordinals in therange
[0, (maxOrd - minOrd)], which is necessary for certain aggregations andsorting options to be supported.
As discussed in #41220, I opted not to support
KeyedIndexFieldData#getOrdinalMap, as it would add substantial complexity.The one place this affects is the 'low cardinality' optimization for terms
aggregations, which now needs to be disabled for keyed JSON fields.
It was fairly difficult to incorporate this change, and I have a couple
follow-up refactors in mind to help simplify the global ordinals code. (I will
likely wait until this feature branch is merged though before opening PRs on
master).