Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
62386: colbuilder: minor optimization of removing redundant allocations r=yuzefovich a=yuzefovich At the end of `NewColOperator` call we have to enforce that the result column type schema is as expected. We do so by comparing the actual and the expected types and planning casts if needed with a simple project op to remove the leftovers. Previously, we would always allocate a uint32 slice for the projection and a types slice in `addProjection`, regardless of the fact whether projection is redundant or not (note that in `NewSimpleProjectOp` we would end up returning the original operator). This is unnecessary in most cases, so we now delay the allocation of the projection slice until we find the first column that needs a cast. Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]>
- Loading branch information