@Override public OExecutionStep copy(OCommandContext ctx) { return new FilterStep(this.whereClause.copy(), ctx, profilingEnabled); } }
private void handleWhere(ODeleteExecutionPlan result, OCommandContext ctx, OWhereClause whereClause, boolean profilingEnabled) { if (whereClause != null) { result.chain(new FilterStep(whereClause, ctx, profilingEnabled)); } }
private void handleWhere(OSelectExecutionPlan plan, QueryPlanningInfo info, OCommandContext ctx, boolean profilingEnabled) { if (info.whereClause != null) { if (info.distributedPlanCreated) { plan.chain(new FilterStep(info.whereClause, ctx, profilingEnabled)); } else { for (OSelectExecutionPlan shardedPlan : info.distributedFetchExecutionPlans.values()) { shardedPlan.chain(new FilterStep(info.whereClause.copy(), ctx, profilingEnabled)); } } } }
result.add(new FilterStep(createWhereFrom(desc.remainingCondition), ctx, profilingEnabled));
private OExecutionStepInternal createParallelIndexFetch(List<IndexSearchDescriptor> indexSearchDescriptors, Set<String> filterClusters, OCommandContext ctx, boolean profilingEnabled) { List<OInternalExecutionPlan> subPlans = new ArrayList<>(); for (IndexSearchDescriptor desc : indexSearchDescriptors) { OSelectExecutionPlan subPlan = new OSelectExecutionPlan(ctx); subPlan.chain(new FetchFromIndexStep(desc.idx, desc.keyCondition, desc.additionalRangeCondition, ctx, profilingEnabled)); int[] filterClusterIds = null; if (filterClusters != null) { filterClusterIds = filterClusters.stream().map(name -> ctx.getDatabase().getClusterIdByName(name)).mapToInt(i -> i) .toArray(); } subPlan.chain(new GetValueFromIndexEntryStep(ctx, filterClusterIds, profilingEnabled)); if (requiresMultipleIndexLookups(desc.keyCondition)) { subPlan.chain(new DistinctExecutionStep(ctx, profilingEnabled)); } if (desc.remainingCondition != null && !desc.remainingCondition.isEmpty()) { subPlan.chain(new FilterStep(createWhereFrom(desc.remainingCondition), ctx, profilingEnabled)); } subPlans.add(subPlan); } return new ParallelExecStep(subPlans, ctx, profilingEnabled); }
handleLet(subPlan, info, ctx, profilingEnabled); subPlan.chain(new FilterStep(createWhereFrom(block), ctx, profilingEnabled)); handleLet(subPlan, info, ctx, profilingEnabled); subPlan.chain(new FilterStep(createWhereFrom(block), ctx, profilingEnabled)); handleLet(plan, info, ctx, profilingEnabled); plan.chain(new FilterStep(createWhereFrom(block), ctx, profilingEnabled)); subPlan.chain(step); if (!block.getSubBlocks().isEmpty()) { subPlan.chain(new FilterStep(createWhereFrom(block), ctx, profilingEnabled));
OWhereClause where = new OWhereClause(-1); where.setBaseExpression(ridCondition); result.chain(new FilterStep(where, ctx, profilingEnabled));
OWhereClause where = new OWhereClause(-1); where.setBaseExpression(ridCondition); result.chain(new FilterStep(where, ctx, profilingEnabled));