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, channelOffset, field, onlySingleValueParams -
Constructor Summary
ConstructorsConstructorDescriptionBinaryComparisonQueryList(MappedFieldType field, ElementType leftHandSideElementType, int channelOffset, EsqlBinaryComparison binaryComparison, ClusterService clusterService, AliasFilter aliasFilter, Warnings warnings) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.QuerydoGetQuery(int position, int firstValueIndex, int valueCount, Block inputBlock, SearchExecutionContext searchExecutionContext) onlySingleValues(Warnings warnings, String multiValueWarningMessage) Methods inherited from class org.elasticsearch.compute.operator.lookup.QueryList
createBlockValueReaderForType, dateNanosTermQueryList, dateTermQueryList, geoShapeQueryList, getPositionCount, getQuery, ipTermQueryList, rawTermQueryListMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.compute.operator.lookup.LookupEnrichQueryGenerator
getBulkKeywordLookup
-
Constructor Details
-
BinaryComparisonQueryList
public BinaryComparisonQueryList(MappedFieldType field, ElementType leftHandSideElementType, int channelOffset, 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, Block inputBlock, SearchExecutionContext searchExecutionContext) - Specified by:
doGetQueryin classQueryList
-