| 2177 | |
| 2178 | template <typename T> |
| 2179 | void copyWordsWithRows( |
| 2180 | T* destination, |
| 2181 | const int32_t* rows, |
| 2182 | const int32_t* indices, |
| 2183 | int32_t numIndices, |
| 2184 | const T* values, |
| 2185 | bool isLongDecimal = false) { |
| 2186 | if (!indices) { |
| 2187 | copyWords(destination, rows, numIndices, values, isLongDecimal); |
| 2188 | return; |
| 2189 | } |
| 2190 | if (std::is_same_v<T, int128_t> && isLongDecimal) { |
| 2191 | for (auto i = 0; i < numIndices; ++i) { |
| 2192 | reinterpret_cast<int128_t*>(destination)[i] = toJavaDecimalValue( |
| 2193 | reinterpret_cast<const int128_t*>(values)[rows[indices[i]]]); |
| 2194 | } |
| 2195 | return; |
| 2196 | } |
| 2197 | for (auto i = 0; i < numIndices; ++i) { |
| 2198 | destination[i] = values[rows[indices[i]]]; |
| 2199 | } |
| 2200 | } |
| 2201 | |
| 2202 | template <typename T> |
| 2203 | void appendNonNull( |
no test coverage detected