Skip to content

Conversation

julian-elastic
Copy link
Contributor

No description provided.

Copy link
Contributor

github-actions bot commented Jul 29, 2025

🔍 Preview links for changed docs

@julian-elastic julian-elastic force-pushed the lookupPreFilter branch 2 times, most recently from dc1e1a2 to ee11e41 Compare August 1, 2025 19:27
);
builder.append(
new FieldAttribute(Source.EMPTY, "Positions", new EsField("Positions", DataType.INTEGER, Collections.emptyMap(), false))
);
Copy link
Contributor Author

@julian-elastic julian-elastic Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nik9000
FilterOperator.FilterOperatorFactory needs an ExpressionEvaluator.Factory which needs a Layout.

How do I build a Layout here?
I attached 2 columns from the EnrichQuerySourceOperator and then whatever else we have in request.extractFields. It seems to work, because we don't refer to the first 2 columns.

EnrichQuerySourceOperator says there are 2 columns so I added them, but not sure what I have is correct. In particular the Docs column should be a vector, right? But there is no vector datatype.

}

var evaluatorFactory = EvalMapper.toEvaluator(
FoldContext.small()/*is this correct*/,
Copy link
Contributor Author

@julian-elastic julian-elastic Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nik9000 Should I use FoldContext.small() here?

@julian-elastic julian-elastic changed the title Improve Lookup Join performance by pushing a filter to the lookup join Improve Expanding Lookup Join performance by pushing a filter to the lookup join Aug 1, 2025
releasables.add(extractFieldsOperator);
operators.add(extractFieldsOperator);
}
if (queryList instanceof PostJoinFilterable postJoinFilterable) {
FilterExec filterExec = postJoinFilterable.getPostJoinFilter();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not update the logical plan (within the fragment) with a Filter atop the source for the lookup index and let the existing infra generate the operator?

Copy link
Contributor Author

@julian-elastic julian-elastic Aug 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bpintea I am not sure I completely sure I understand, can you please expand? Do you mean generate it on the data node? We don't do logical or any other planning on the lookup node right now. This will be executed on the node that contains the lookup index. It filters the data before it is sent to the data node. So I think it needs to use the shard context and such from the lookup index node.

@julian-elastic
Copy link
Contributor Author

Rebased the PR, to be merged with #132889

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants