| 99 | } |
| 100 | |
| 101 | bool VectorPool::TypePool::maybePushBack(VectorPtr& vector) { |
| 102 | // Check that this is a Flat Vector with an initialized, unique, and mutable |
| 103 | // values Buffer and an uninitialized or unique and mutable nulls Buffer. |
| 104 | if (!vector->isWritable() || !vector->isFlatEncoding() || !vector->values()) { |
| 105 | return false; |
| 106 | } |
| 107 | if (size >= kNumPerType) { |
| 108 | return false; |
| 109 | } |
| 110 | |
| 111 | vector->prepareForReuse(); |
| 112 | vectors[size++] = std::move(vector); |
| 113 | return true; |
| 114 | } |
| 115 | |
| 116 | VectorPtr VectorPool::TypePool::pop( |
| 117 | const TypePtr& type, |
no test coverage detected