diff options
author | Andrey Kulaga <aakulaga@ydb.tech> | 2024-01-30 13:44:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-30 13:44:30 +0300 |
commit | f09d5645979d1737861332457c8b64340ce793e7 (patch) | |
tree | 32272fb0b1619919920164d00d6208d471bd5028 | |
parent | 97103370d3942b7301dfd3d042df52dcf0bc15b5 (diff) | |
download | ydb-f09d5645979d1737861332457c8b64340ce793e7.tar.gz |
JsonDocument support added YQL-17658 (#1306)
* JsonDocument support added
* New wide date types support added
* Duplicates in switch statement removed
-rw-r--r-- | ydb/library/yql/minikql/comp_nodes/mkql_grace_join.cpp | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/ydb/library/yql/minikql/comp_nodes/mkql_grace_join.cpp b/ydb/library/yql/minikql/comp_nodes/mkql_grace_join.cpp index af2b832e77..b98153d669 100644 --- a/ydb/library/yql/minikql/comp_nodes/mkql_grace_join.cpp +++ b/ydb/library/yql/minikql/comp_nodes/mkql_grace_join.cpp @@ -161,8 +161,6 @@ TColumnDataPackInfo GetPackInfo(TType* type) { res.Bytes = sizeof(ui64); break; case NUdf::EDataSlot::Interval: res.Bytes = sizeof(i64); break; - case NUdf::EDataSlot::Uuid: - res.IsString = true; break; case NUdf::EDataSlot::TzDate: res.Bytes = 4; break; case NUdf::EDataSlot::TzDatetime: @@ -171,12 +169,20 @@ TColumnDataPackInfo GetPackInfo(TType* type) { res.Bytes = 10; break; case NUdf::EDataSlot::Decimal: res.Bytes = 16; break; + case NUdf::EDataSlot::Date32: + res.Bytes = 4; break; + case NUdf::EDataSlot::Datetime64: + res.Bytes = 8; break; + case NUdf::EDataSlot::Timestamp64: + res.Bytes = 8; break; + case NUdf::EDataSlot::Interval64: + res.Bytes = 8; break; + case NUdf::EDataSlot::Uuid: + case NUdf::EDataSlot::DyNumber: + case NUdf::EDataSlot::JsonDocument: case NUdf::EDataSlot::String: - res.IsString = true; break; case NUdf::EDataSlot::Utf8: - res.IsString = true; break; case NUdf::EDataSlot::Yson: - res.IsString = true; break; case NUdf::EDataSlot::Json: res.IsString = true; break; default: @@ -265,6 +271,15 @@ void TGraceJoinPacker::Pack() { WriteUnaligned<ui64>(buffPtr, value.Get<ui64>()); break; case NUdf::EDataSlot::Interval: WriteUnaligned<i64>(buffPtr, value.Get<i64>()); break; + case NUdf::EDataSlot::Date32: + WriteUnaligned<i64>(buffPtr, value.Get<i32>()); break; + case NUdf::EDataSlot::Datetime64: + WriteUnaligned<i64>(buffPtr, value.Get<i64>()); break; + case NUdf::EDataSlot::Timestamp64: + WriteUnaligned<i64>(buffPtr, value.Get<i64>()); break; + case NUdf::EDataSlot::Interval64: + WriteUnaligned<i64>(buffPtr, value.Get<i64>()); break; + case NUdf::EDataSlot::Uuid: { auto str = TuplePtrs[i]->AsStringRef(); @@ -377,6 +392,14 @@ void TGraceJoinPacker::UnPack() { value = NUdf::TUnboxedValuePod(ReadUnaligned<ui64>(buffPtr)); break; case NUdf::EDataSlot::Interval: value = NUdf::TUnboxedValuePod(ReadUnaligned<i64>(buffPtr)); break; + case NUdf::EDataSlot::Date32: + value = NUdf::TUnboxedValuePod(ReadUnaligned<i32>(buffPtr)); break; + case NUdf::EDataSlot::Datetime64: + value = NUdf::TUnboxedValuePod(ReadUnaligned<i64>(buffPtr)); break; + case NUdf::EDataSlot::Timestamp64: + value = NUdf::TUnboxedValuePod(ReadUnaligned<i64>(buffPtr)); break; + case NUdf::EDataSlot::Interval64: + value = NUdf::TUnboxedValuePod(ReadUnaligned<i64>(buffPtr)); break; case NUdf::EDataSlot::Uuid: { value = MakeString(NUdf::TStringRef(TupleStrings[offset], TupleStrSizes[offset])); |