MCPcopy Create free account
hub / github.com/bytedance/bolt / copyWordsWithRows

Function copyWordsWithRows

bolt/serializers/PrestoSerializer.cpp:2179–2200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2177
2178template <typename T>
2179void 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
2202template <typename T>
2203void appendNonNull(

Callers 1

appendNonNullFunction · 0.85

Calls 2

copyWordsFunction · 0.85
toJavaDecimalValueFunction · 0.85

Tested by

no test coverage detected