Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ydb/library/yql/parser/pg_wrapper/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ inline NKikimr::NUdf::TUnboxedValuePod AnyDatumToPod(Datum datum, bool passByVal
}

inline Datum PointerDatumFromPod(const NKikimr::NUdf::TUnboxedValuePod& value) {
return (Datum)(((const NKikimr::NMiniKQL::TMkqlPAllocHeader*)value.AsBoxed().Get()) + 1);
return (Datum)(((const NKikimr::NMiniKQL::TMkqlPAllocHeader*)value.AsRawBoxed()) + 1);
}

inline Datum PointerDatumFromItem(const NKikimr::NUdf::TBlockItem& value) {
Expand Down
2 changes: 2 additions & 0 deletions ydb/library/yql/public/udf/udf_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,8 @@ friend class TUnboxedValue;

inline TStringValue AsStringValue() const;
inline IBoxedValuePtr AsBoxed() const;
inline TStringValue::TData* AsRawStringValue() const;
inline IBoxedValue* AsRawBoxed() const;
inline bool UniqueBoxed() const;

// special values
Expand Down
12 changes: 12 additions & 0 deletions ydb/library/yql/public/udf/udf_value_inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,18 @@ inline IBoxedValuePtr TUnboxedValuePod::AsBoxed() const
return IBoxedValuePtr(Raw.Boxed.Value);
}

inline TStringValue::TData* TUnboxedValuePod::AsRawStringValue() const
{
UDF_VERIFY(IsString(), "Value is not a string");
return Raw.String.Value;
}

inline IBoxedValue* TUnboxedValuePod::AsRawBoxed() const
{
UDF_VERIFY(IsBoxed(), "Value is not boxed");
return Raw.Boxed.Value;
}

inline bool TUnboxedValuePod::UniqueBoxed() const
{
UDF_VERIFY(IsBoxed(), "Value is not boxed");
Expand Down