Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table Resolver #840

Merged
merged 30 commits into from
Oct 10, 2024
Merged

Table Resolver #840

merged 30 commits into from
Oct 10, 2024

Conversation

nablaone
Copy link
Member

@nablaone nablaone commented Oct 3, 2024

This PR introduces Table Resolver. Table resolver answers the question "What will Quesma do for given index (or index pattern)?"

It has three parts:

  • TableResolver interface and implementation
  • set of rules
  • UI

Limitations:
It doesn't perform any actions based on decision. Rules can be incomplete or simply wrong. It will be finished in the next PR.

@nablaone nablaone changed the title Index registry Pattern Resolver Oct 8, 2024
cfg: ingestConf,
resolver: &composedResolver{
decisionLadder: []namedResolver{
{"patternIsNotAllowed", patternIsNotAllowed},
Copy link
Contributor

Choose a reason for hiding this comment

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

Where these callbacks are defined like patternIsNotAllowed?

Copy link
Contributor

@pdelewski pdelewski Oct 9, 2024

Choose a reason for hiding this comment

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

ok, I see, rules.go.

@nablaone nablaone changed the title Pattern Resolver Table Resolver Oct 9, 2024
@nablaone nablaone marked this pull request as ready for review October 9, 2024 15:01
@nablaone nablaone requested a review from a team as a code owner October 9, 2024 15:01
@@ -265,6 +271,10 @@ func (q *QueryRunner) executePlan(ctx context.Context, plan *model.ExecutionPlan
}

func (q *QueryRunner) handleSearchCommon(ctx context.Context, indexPattern string, body types.JSON, optAsync *AsyncQuery, queryLanguage QueryLanguage) ([]byte, error) {

decision := q.tableResolver.Resolve(table_resolver.QueryPipeline, indexPattern)
table_resolver.TODO("handleSearchCommon", decision)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you already thought about dispatch implementation? (functionality of current TODOs)

Copy link
Member Author

Choose a reason for hiding this comment

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

TODO is a marker function. It will be removed.

Copy link
Contributor

Choose a reason for hiding this comment

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

I know it's marker but you need to do something based on decision and I'm asking about this implementation

Copy link
Member Author

Choose a reason for hiding this comment

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

I had a vision, but I can't tell you how it will be implemented.

@nablaone nablaone enabled auto-merge October 10, 2024 10:59
@nablaone nablaone added this pull request to the merge queue Oct 10, 2024
Merged via the queue into main with commit 7611eba Oct 10, 2024
5 checks passed
@nablaone nablaone deleted the exp-index-management branch October 10, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants