Skip to content

Commit

Permalink
Some code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
craigtaverner committed Nov 22, 2024
1 parent 6499e25 commit beeccfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,7 @@ private static class ResolveTable extends ParameterizedAnalyzerRule<UnresolvedRe

@Override
protected LogicalPlan rule(UnresolvedRelation plan, AnalyzerContext context) {
if (plan.indexMode().equals(IndexMode.LOOKUP)) {
return resolveIndex(plan, context.lookupResolution());
}
return resolveIndex(plan, context.indexResolution());
return resolveIndex(plan, plan.indexMode().equals(IndexMode.LOOKUP) ? context.lookupResolution() : context.indexResolution());
}

private LogicalPlan resolveIndex(UnresolvedRelation plan, IndexResolution indexResolution) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public record AnalyzerContext(
IndexResolution lookupResolution,
EnrichResolution enrichResolution
) {
// Currently for tests only, since most do not test lookups
// TODO: make this even simpler, remove the enrichResolution for tests that do not require it (most tests)
public AnalyzerContext(
Configuration configuration,
EsqlFunctionRegistry functionRegistry,
Expand Down

0 comments on commit beeccfc

Please sign in to comment.