Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public class CalcitePlanContext {
/** This thread local variable is only used to skip script encoding in script pushdown. */
public static final ThreadLocal<Boolean> skipEncoding = ThreadLocal.withInitial(() -> false);

/** When true, disables the OpenSearch shard request cache for the current query. */
public static final ThreadLocal<Boolean> disableRequestCache =
ThreadLocal.withInitial(() -> false);

/** When true, the execution engine strips all-null columns from the result (used by timewrap). */
public static final ThreadLocal<Boolean> stripNullColumns = ThreadLocal.withInitial(() -> false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ public class AnalyzeResponse {
private final List<String> physicalPlan;
private final QueryProfile profile;
private final List<OperatorNode> operator_tree;
private final List<String> recommendations;
private final List<Recommendation> recommendations;
private final List<SchemaColumn> schema;
private final Object[][] datarows;
private final long total;
private final long size;
private final boolean possibleCacheHit;

@Data
@Builder
Expand All @@ -46,11 +47,28 @@ public static class QuerySegment {
public static class OperatorNode {
private final String source;
private final List<String> node_type;
private final List<Float> node_cost;
private final List<String> description;
private final String estimated_cost;
private final Long estimated_rows;
private final String actual_time_ms;
private final Long actual_rows;
private final Boolean is_pushed_down;
}

public enum RecommendationSeverityLevel {
INFO,
WARNING,
CRITICAL
}

@Data
@Builder
public static class Recommendation {
private final RecommendationSeverityLevel serverity;
private final String rule;
private final String message;
private final String affected_node;
private final String suggestion;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ default void explain(
explain(plan, mode, context, listener);
}

/**
* Get the cumulative request cache hit count for the given indices. Returns -1 if not supported
* by this engine.
*/
default long getRequestCacheHitCount(String... indexNames) {
return -1;
}

/** Data class that encapsulates ExprValue. */
@Data
class QueryResponse {
Expand Down
Loading
Loading