Skip to content

Commit e2f774d

Browse files
committed
first chicken_score PoC
1 parent 819b364 commit e2f774d

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@ private static FunctionDefinition[][] snapshotFunctions() {
446446
def(Rate.class, Rate::withUnresolvedTimestamp, "rate"),
447447
def(MaxOverTime.class, uni(MaxOverTime::new), "max_over_time"),
448448
def(AvgOverTime.class, uni(AvgOverTime::new), "avg_over_time"),
449-
def(ChickenScore.class, uni(ChickenScore::new), "chicken_score"),
450449
def(LastOverTime.class, LastOverTime::withUnresolvedTimestamp, "last_over_time"),
450+
def(ChickenScore.class, uni(ChickenScore::new), "chicken_score"),
451451
def(Term.class, bi(Term::new), "term") } };
452452
}
453453

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/FullTextFunction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ private static void checkFullTextQueryFunctions(LogicalPlan plan, Failures failu
227227
);
228228
checkFullTextFunctionsParents(condition, failures);
229229
} else {
230-
plan.forEachExpression(FullTextFunction.class, ftf -> {
230+
/*plan.forEachExpression(FullTextFunction.class, ftf -> {
231231
failures.add(fail(ftf, "[{}] {} is only supported in WHERE commands", ftf.functionName(), ftf.functionType()));
232-
});
232+
});*/
233233
}
234234
}
235235

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/FullTextWritables.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ public static List<NamedWriteableRegistry.Entry> getNamedWriteables() {
2727
if (EsqlCapabilities.Cap.TERM_FUNCTION.isEnabled()) {
2828
entries.add(Term.ENTRY);
2929
}
30-
if (EsqlCapabilities.Cap.CHICKEN_SCORE.isEnabled()) {
31-
entries.add(ChickenScore.ENTRY);
32-
}
3330

3431
return Collections.unmodifiableList(entries);
3532
}

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/planner/LocalExecutionPlanner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ private PhysicalOperation planEval(EvalExec eval, LocalExecutionPlannerContext c
461461
PhysicalOperation source = plan(eval.child(), context);
462462

463463
for (Alias field : eval.fields()) {
464-
var evaluatorSupplier = EvalMapper.toEvaluator(context.foldCtx(), field.child(), source.layout);
464+
var evaluatorSupplier = EvalMapper.toEvaluator(context.foldCtx(), field.child(), source.layout, shardContexts);
465465
Layout.Builder layout = source.layout.builder();
466466
layout.append(field.toAttribute());
467467
source = source.with(new EvalOperatorFactory(evaluatorSupplier), layout.build());

0 commit comments

Comments
 (0)