databend
databend copied to clipboard
Feature: Introduce a new `PipelineContext` for each pipeline
There was a discussion about this in https://github.com/datafuselabs/databend/issues/741.
The shared and local QueryContext is not clear, we'd better extract the local information(e.g. partition info) to a pipeline-local PipelineContext.
cc @BohuTANG @sundy-li @zhang2014
Our goal is to move the state into the processor. Including "partition info", which has been implemented in some table engines.
By the way:
QueryContext: one-to-one with sub queries.QueryContextShared: shared for sub queries in one query
for example: SELECT (SELECT 1) FROM table, in this case SELECT 1 has a QueryContext, SELECT (SELECT 1) FROM table has a QueryContext, They share a QueryContextShared