-
Notifications
You must be signed in to change notification settings - Fork 6
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
Table Resolver #840
Conversation
cfg: ingestConf, | ||
resolver: &composedResolver{ | ||
decisionLadder: []namedResolver{ | ||
{"patternIsNotAllowed", patternIsNotAllowed}, |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
.
@@ -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) |
There was a problem hiding this comment.
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
)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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 implementationLimitations:
It doesn't perform any actions based on decision. Rules can be incomplete or simply wrong. It will be finished in the next PR.