Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
56224: colexec: optimize the read path a bit and cleanup internal memory handling r=yuzefovich a=yuzefovich **colexec: reuse the same eval context for objects of the same proc spec** In the row-execution processors we create a copy of the eval context for each processor core because the processor might modify it. In the vectorized engine we took it to the extreme - we're currently creating a copy for every usage of the eval context. That is unnecessary, and this commit makes the vectorized operator creator to be more like the row engine - by reusing the same eval context for all operators that are created for a single processor spec. This commit also switches to using the "original" eval context that is part of the flow context when instantiating a ColumnFactory and when initializing materializers because those two components don't modify the eval context. Release note: None **colconv,colfetcher: pool allocations of converters and cTableInfos** This commit pools the allocations of the converters when they are used in the materializers as well as `cTableInfo` structs used by the ColBatchScan. Additionally, this commit reuses the same ColumnFactory when setting up the whole flow and removes a copy of a processor spec when checking whether it is supported. Another notable change is reusing the same global empty post-processing spec when creating the materializers. It is thread-safe because the object is never modified. Release note: None **colbuilder: remove redundant expr deserialization after scan** Whenever we're creating a `ColBatchScan`, we're initializing a `ProcOutputHelper` in order to obtain the set of needed columns (based on the schema of the table and the post-processing spec). As part of that initialization we're obtaining well-typed expression for everything in the post-processing spec. However, later when actually planning the post-processing in the vectorized engine we deserialize the expressions again. This is redundant, and the code has been adjusted to reuse the same helper for both scan operator creation and post-processing planning. Additionally, those `ProcOutputHelper` objects are now pooled. Release note: None **colexec: update the allocator with the internal memory usage** This commit removes `InternalMemoryOperator` interface that was put in-place for the operators to register their static memory usage. This was introduced before we had the allocator object (I think), and now we can remove that interface and simply update the allocators with the corresponding internal memory usage. There were only two operators that actually implemented the interface, and both of them were converted to the new pattern. This commit also removes the separation of streaming memory accounts in the vectorized flow setup and merges them with all other accounts. Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]>
- Loading branch information