Fix queries with LUCENE indexes and conditions on LET
Resolves:
@@ -1552,6 +1552,9 @@ public class OSelectExecutionPlanner {
OSelectExecutionPlan subPlan = new OSelectExecutionPlan(ctx);
subPlan.chain(step);
if (!block.getSubBlocks().isEmpty()) {
+ if ((info.perRecordLetClause != null && refersToLet(block.getSubBlocks()))) {
+ handleLet(subPlan, info, ctx, profilingEnabled);
+ }
subPlan.chain(new FilterStep(createWhereFrom(block), ctx, profilingEnabled));
}
resultSubPlans.add(subPlan);
@@ -1598,6 +1601,9 @@ public class OSelectExecutionPlanner {
plan.chain(step);
plan.chain(new FilterByClustersStep(filterClusters, ctx, profilingEnabled));
if (!block.getSubBlocks().isEmpty()) {
+ if ((info.perRecordLetClause != null && refersToLet(block.getSubBlocks()))) {
+ handleLet(plan, info, ctx, profilingEnabled);
+ }
plan.chain(new FilterStep(createWhereFrom(block), ctx, profilingEnabled));
}
} else {
