Add support for Union All#6351
Conversation
dbe7d84 to
5ba333e
Compare
ffade1a to
6c5a535
Compare
cc061e4 to
de47c6a
Compare
sougou
left a comment
There was a problem hiding this comment.
In case you haven't, can you also make sure that you've sanity checked code coverage?
be41b8c to
19d0d98
Compare
6406ec1 to
d6e5d51
Compare
go/vt/vtgate/engine/concatenate.go
Outdated
There was a problem hiding this comment.
As a general rule, we should not change the caller's context. Although things will work as expected in this case, it's better to still follow the rule. This means that you have to create a local cancel-able one and use that instead.
There was a problem hiding this comment.
I think we need the engine primitives to use this new cancelable context. Contexts are like onions - there are layers to them. We are merely adding a cancelable layer to the context the caller provided us with. if you want, we could peel that layer before leaving this method, to restore the original context.
There was a problem hiding this comment.
Oh. I didn't realize that you were passing vcursor down to the callees. So, it's ok to leave it as is for now.
There was a problem hiding this comment.
The context created here needs to be sent down to calls from here one. So that once the context is cancelled. The lower layers can also stop processing.
The issue here is the lower layer can receive this new context via vcursor as of now. So, the current way was to replace it.
Once we start passing context separately this would not be an issue.
@systay The current suggestion does not hold. Because if we replace the vcursor context and there is parent branch which has vcursor usage. It will already be updated and using the new context. So peeling off before returning may not guarantee things are in order.
sougou
left a comment
There was a problem hiding this comment.
You can merge after resolving conflicts.
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Added supported for union all. At VTGate in memory concatenation of results will happen.
Current Limitation: If there is column type mismatch between different union it will fail than resolving the type.
Closes: #4613