Class BinaryComparisonQueryList
java.lang.Object
org.elasticsearch.compute.operator.lookup.QueryList
org.elasticsearch.xpack.esql.enrich.BinaryComparisonQueryList
- All Implemented Interfaces:
LookupEnrichQueryGenerator
A
QueryList that generates a query for a binary comparison.
This class is used in the context of an expression based lookup join,
where we need to generate a query for each row of the left dataset.
The query is then used to fetch the matching rows from the right dataset.
The query is a binary comparison between a field from the right dataset
and a single value from the left dataset. e.g right_id > 5
The value is extracted from a block at a given position.
The comparison is then translated to a Lucene query.
If the comparison cannot be translated, an exception is thrown.
This class is used in conjunction with ExpressionQueryList to generate the final query for the lookup join.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.compute.operator.lookup.QueryList
QueryList.OnlySingleValueParams -
Field Summary
Fields inherited from class org.elasticsearch.compute.operator.lookup.QueryList
aliasFilter, block, field, onlySingleValueParams -
Constructor Summary
ConstructorsConstructorDescriptionBinaryComparisonQueryList(MappedFieldType field, SearchExecutionContext searchExecutionContext, Block leftHandSideBlock, EsqlBinaryComparison binaryComparison, ClusterService clusterService, AliasFilter aliasFilter, Warnings warnings) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.QuerydoGetQuery(int position, int firstValueIndex, int valueCount) onlySingleValues(Warnings warnings, String multiValueWarningMessage) Methods inherited from class org.elasticsearch.compute.operator.lookup.QueryList
createBlockValueReader, dateNanosTermQueryList, dateTermQueryList, geoShapeQueryList, getPositionCount, getQuery, ipTermQueryList, rawTermQueryList
-
Constructor Details
-
BinaryComparisonQueryList
public BinaryComparisonQueryList(MappedFieldType field, SearchExecutionContext searchExecutionContext, Block leftHandSideBlock, EsqlBinaryComparison binaryComparison, ClusterService clusterService, AliasFilter aliasFilter, Warnings warnings)
-
-
Method Details
-
onlySingleValues
- Specified by:
onlySingleValuesin classQueryList
-
doGetQuery
public org.apache.lucene.search.Query doGetQuery(int position, int firstValueIndex, int valueCount) - Specified by:
doGetQueryin classQueryList
-