diff options
| -rw-r--r-- | ydb/core/kqp/tools/combiner_perf/hashmaps.h | 21 | ||||
| -rw-r--r-- | ydb/library/yql/dq/comp_nodes/dq_hash_combine.cpp | 20 |
2 files changed, 0 insertions, 41 deletions
diff --git a/ydb/core/kqp/tools/combiner_perf/hashmaps.h b/ydb/core/kqp/tools/combiner_perf/hashmaps.h index 0e07c9a5bf1..850f7a331a6 100644 --- a/ydb/core/kqp/tools/combiner_perf/hashmaps.h +++ b/ydb/core/kqp/tools/combiner_perf/hashmaps.h @@ -42,23 +42,15 @@ struct TRobinHoodMapImplBase bool isNew = false; auto ptr = map.Insert(key, isNew); if (isNew) { -#if defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) auto* payloadPtr = map.GetMutablePayloadPtr(ptr); WriteUnaligned<V>(payloadPtr, delta); -#else - *(V*)map.GetMutablePayload(ptr) = delta; -#endif // defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) map.CheckGrow(); } else { -#if defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) auto* payloadPtr = map.GetMutablePayloadPtr(ptr); auto newValue = ReadUnaligned<V>(payloadPtr); newValue += delta; WriteUnaligned<V>(payloadPtr, newValue); -#else - *(V*)map.GetMutablePayload(ptr) += delta; -#endif // defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) } } @@ -68,36 +60,23 @@ struct TRobinHoodMapImplBase if (existingPtr == nullptr) { return; } -#if defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) auto* payloadPtr = map.GetMutablePayloadPtr(existingPtr); auto newValue = ReadUnaligned<V>(payloadPtr); newValue += delta; WriteUnaligned<V>(payloadPtr, newValue); -#else - *(V*)map.GetMutablePayload(existingPtr) += delta; -#endif // defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) } template<typename Callback> static void IteratePairs(const TMapType& map, Callback&& callback) { for (const char* iter = map.Begin(); iter != map.End(); map.Advance(iter)) { -#if defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) if (!map.IsValid(iter)) { continue; } const auto& key = map.GetKeyValue(iter); const auto& value = ReadUnaligned<V>(map.GetPayloadPtr(iter)); callback(key, value); -#else - if (!const_cast<TMapType&>(map).IsValid(iter)) { - continue; - } - const auto& key = map.GetKey(iter); - const auto& value = *(V*)(const_cast<TMapType&>(map)).GetPayload(iter); - callback(key, value); -#endif // defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) } } diff --git a/ydb/library/yql/dq/comp_nodes/dq_hash_combine.cpp b/ydb/library/yql/dq/comp_nodes/dq_hash_combine.cpp index dedfa57b289..f145b86202b 100644 --- a/ydb/library/yql/dq/comp_nodes/dq_hash_combine.cpp +++ b/ydb/library/yql/dq/comp_nodes/dq_hash_combine.cpp @@ -392,11 +392,7 @@ protected: if (isNew) { statePtr = static_cast<char *>(KeyStateBuffer) + StatesOffset; } else { -#if defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) TUnboxedValuePod* mapKeyPtr = Map->GetKeyValue(mapIt); -#else - TUnboxedValuePod* mapKeyPtr = Map->GetKey(mapIt); -#endif // defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) statePtr = reinterpret_cast<char *>(mapKeyPtr) + StatesOffset; } @@ -549,11 +545,7 @@ protected: if (!Map->IsValid(mapIter)) { continue; } -#if defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) auto* entry = Map->GetKeyValue(mapIter); -#else - auto* entry = Map->GetKey(mapIter); -#endif // defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) auto entryMem = MemoryHelper.EstimateKeySize(entry); if (!entryMem.has_value()) { unbounded = true; @@ -741,11 +733,7 @@ public: return false; } - #if defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) const auto key = Map->GetKeyValue(DrainMapIterator); - #else - const auto key = Map->GetKey(DrainMapIterator); - #endif // defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) if (HasGenericAggregation) { auto keyIter = key; @@ -790,11 +778,7 @@ public: if (!Map->IsValid(DrainMapIterator)) { continue; } -#if defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) const auto key = Map->GetKeyValue(DrainMapIterator); -#else - const auto key = Map->GetKey(DrainMapIterator); -#endif // defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) char* statePtr = static_cast<char *>(static_cast<void *>(key)) + StatesOffset; for (auto& agg : Aggs) { agg->ForgetState(statePtr); @@ -1005,11 +989,7 @@ public: continue; } -#if defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) const auto key = Map->GetKeyValue(DrainMapIterator); -#else - const auto key = Map->GetKey(DrainMapIterator); -#endif // defined(MKQL_RH_HASH_MOVE_API_TO_NEW_VERSION) if (HasGenericAggregation) { auto keyIter = key; for (ui32 i = 0U; i < Nodes.FinishKeyNodes.size(); ++i) { |
