-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Use FallbackSyntheticSourceBlockLoader for point and geo_point #125816
base: main
Are you sure you want to change the base?
Conversation
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
Hi @lkts, 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. Thanks Sasha!
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.
Thanks! This looks good, I just have two questions
- Maybe I missed something, but how is the
x-pack/plugin/logsdb/property-tests/.jqwik-database
file being used? - The other one is on
GeoPointFieldMapper
.
return new BlockDocValuesReader.LongsBlockLoader(name()); | ||
} | ||
|
||
// _ignored_source field will only be present if there is no doc_values |
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.
I don't fully understand this, can someone not just use synthetic source and enable doc values? In that case there wouldn't be _source to fallback to?
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.
I am not sure i fully understand the question. This is needed due to the blContext.fieldExtractPreference() == DOC_VALUES
check above. There are two scenarios possible once we arrive here:
- Stored source - we'll just use
blockLoaderFromSource
- Synthetic source. However because of the
fieldExtractPreference()
check above it is still possible that doc_values are present here. So we have two sub-cases:- doc_values are enabled -
_ignored_source_
does not exist since we have doc_values and we useblockLoaderFromSource
which reads "classic" synthetic source. - doc_values are disabled - we know that
_ignored_source
field is present and use special block loader.
- doc_values are enabled -
I think the ideal scenario here is to implement yet another block loader that will directly read doc_values and transform them into a WKB format bypassing the synthetic source.
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.
Ok, cool, I get this now. Would you be able to add this comment to line 540?
It's not :) |
if (syntheticSourceKeep.equals("all")) { | ||
return exactValuesFromSource(values, nullValue); | ||
} | ||
if (syntheticSourceKeep.equals("arrays") && extractedFieldValues.documentHasObjectArrays()) { |
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.
This is an interesting case and i suspect it is not intentional.
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.
Can you elaborate why this isn't intentional?
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.
We don't apply custom logic of synthetic_source_keep: "arrays"
to fields that have parsesArrayValue()
set to true
. But in this context we do.
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
This PR introduces usage of
FallbackSyntheticSourceBlockLoader
forpoint
andgeo_point
fields and adds relevant tests.