Class ApproximationVerifier
java.lang.Object
org.elasticsearch.xpack.esql.approximation.ApproximationVerifier
This class approximate results for certain classes of ES|QL queries.
Approximate results are usually much faster to compute than exact results.
A query is currently suitable for approximation if:
- it has a supported
STATSlayout: withoutFORK, exactly oneSTATS; withFORK, eitherFROM | FORK (...) | STATS(oneSTATSafter the fork, none inside branches) orFROM | STATS | FORK (...)(exactly oneSTATSper branch) - the other processing commands are from the supported set
(
SUPPORTED_COMMANDS) - the aggregate functions are from the supported set
(
SUPPORTED_SINGLE_VALUED_AGGSandSUPPORTED_MULTIVALUED_AGGS)
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionverifyPlan(LogicalPlan logicalPlan, TransportVersion minimumVersion) Verifies that a plan is suitable for approximation.
-
Constructor Details
-
ApproximationVerifier
public ApproximationVerifier()
-
-
Method Details
-
verifyPlan
public static ApproximationVerifier.QueryProperties verifyPlan(LogicalPlan logicalPlan, TransportVersion minimumVersion) Verifies that a plan is suitable for approximation.- Returns:
- the query properties relevant for approximation if it's suitable, or null otherwise Adds warning headers as a side effect when the plan is not suitable
-