-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Return errors instead of asserting inside runQueryPrepared
#1231
Conversation
HandleFilters
during transferProjection
and properly test prepared errorsHandleFilters
during transferProjection
sql/analyzer/resolve_tables.go
Outdated
@@ -346,6 +346,7 @@ func transferProjections(ctx *sql.Context, from, to *plan.ResolvedTable) *plan.R | |||
} | |||
|
|||
if _, ok := toTable.(sql.FilteredTable); ok { | |||
toTable.(sql.FilteredTable).HandledFilters(filters) |
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.
Something is off here. HandledFilters
seems like a non-mutating method when I look at the analyzer? And WithFilters
is mutating? So it doesn't seem like Dolt tables should only mutate for the HandledFilters
call? I'd think Dolt commit table should answer HandledTables
and mutate on WithFilters
I guess, so not really a GMS problem unless the interfaces are wrong.
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.
Max is right. This is HandledFilters
, it's supposed to return the subset of predicate expressions that can be pushed down to the table. The use here is a no-op.
If the memory table implementation is doing something different, that's a bug.
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.
See comments
sql/analyzer/resolve_tables.go
Outdated
@@ -346,6 +346,7 @@ func transferProjections(ctx *sql.Context, from, to *plan.ResolvedTable) *plan.R | |||
} | |||
|
|||
if _, ok := toTable.(sql.FilteredTable); ok { | |||
toTable.(sql.FilteredTable).HandledFilters(filters) |
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.
Max is right. This is HandledFilters
, it's supposed to return the subset of predicate expressions that can be pushed down to the table. The use here is a no-op.
If the memory table implementation is doing something different, that's a bug.
HandleFilters
during transferProjection
runQueryPrepared
Test PR: