diff --git a/ydb/library/yql/minikql/jsonpath/value.cpp b/ydb/library/yql/minikql/jsonpath/value.cpp index ad77506d8176..e42e5f13bd44 100644 --- a/ydb/library/yql/minikql/jsonpath/value.cpp +++ b/ydb/library/yql/minikql/jsonpath/value.cpp @@ -277,7 +277,7 @@ ui32 TValue::GetSize() const { return value->GetDictLength(); } } else { - Y_ABORT("Unexpected variant case in GetString"); + Y_ABORT("Unexpected variant case in GetSize"); } } @@ -287,9 +287,9 @@ TValue TValue::GetElement(ui32 index) const { if (const auto* value = std::get_if(&Value)) { return TValue(value->GetElement(index)); } else if (const auto* value = std::get_if(&Value)) { - return TValue(value->GetElement(index)); + return TValue(value->Lookup(TUnboxedValuePod(index))); } else { - Y_ABORT("Unexpected variant case in GetString"); + Y_ABORT("Unexpected variant case in GetElement"); } } @@ -304,7 +304,7 @@ TArrayIterator TValue::GetArrayIterator() const { } return TArrayIterator(value->GetListIterator()); } else { - Y_ABORT("Unexpected variant case in GetString"); + Y_ABORT("Unexpected variant case in GetArrayIterator"); } } @@ -332,7 +332,7 @@ TMaybe TValue::Lookup(const TStringBuf key) const { return Nothing(); } } else { - Y_ABORT("Unexpected variant case in GetString"); + Y_ABORT("Unexpected variant case in Lookup"); } } @@ -347,7 +347,7 @@ TObjectIterator TValue::GetObjectIterator() const { } return TObjectIterator(value->GetDictIterator()); } else { - Y_ABORT("Unexpected variant case in GetString"); + Y_ABORT("Unexpected variant case in GetObjectIterator"); } } diff --git a/ydb/library/yql/udfs/common/yson2/yson2_udf.cpp b/ydb/library/yql/udfs/common/yson2/yson2_udf.cpp index 45ff1bb8ffae..b97304c55a2f 100644 --- a/ydb/library/yql/udfs/common/yson2/yson2_udf.cpp +++ b/ydb/library/yql/udfs/common/yson2/yson2_udf.cpp @@ -313,9 +313,9 @@ TUnboxedValuePod LookupImpl(TUnboxedValuePod dict, const TUnboxedValuePod key, c if (index < 0) index += size; if constexpr (Converter != nullptr) { - return Converter(dict.GetElement(index).Release(), valueBuilder, pos); + return Converter(dict.Lookup(TUnboxedValuePod(index)).Release(), valueBuilder, pos); } - return dict.GetElement(index).Release(); + return dict.Lookup(TUnboxedValuePod(index)).Release(); } } }