Skip to content

Commit e2a7c95

Browse files
committed
Fix json
1 parent 3caa09f commit e2a7c95

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

ydb/library/yql/providers/yt/comp_nodes/dq/arrow_converter.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,12 @@ class TYtColumnConverter final : public IYtColumnConverter {
628628
auto result = arrow::compute::Cast(DictPrimitiveConverter_.Convert(block), Settings_.ArrowType);
629629
YQL_ENSURE(result.ok());
630630
return *result;
631+
} else if (Settings_.Type->IsData() && static_cast<NKikimr::NMiniKQL::TDataType*>(Settings_.Type)->GetDataSlot() == NUdf::EDataSlot::Json
632+
&& arrow::Type::STRING == Settings_.ArrowType->id() && arrow::Type::BINARY == valType->id())
633+
{
634+
auto result = arrow::compute::Cast(DictPrimitiveConverter_.Convert(block), Settings_.ArrowType);
635+
YQL_ENSURE(result.ok());
636+
return *result;
631637
} else {
632638
return DictYsonConverter_.Convert(block);
633639
}
@@ -640,6 +646,12 @@ class TYtColumnConverter final : public IYtColumnConverter {
640646
auto result = arrow::compute::Cast(arrow::Datum(*block), Settings_.ArrowType);
641647
YQL_ENSURE(result.ok());
642648
return *result;
649+
} else if (Settings_.Type->IsData() && static_cast<NKikimr::NMiniKQL::TDataType*>(Settings_.Type)->GetDataSlot() == NUdf::EDataSlot::Json
650+
&& arrow::Type::STRING == Settings_.ArrowType->id() && arrow::Type::BINARY == blockType->id())
651+
{
652+
auto result = arrow::compute::Cast(arrow::Datum(*block), Settings_.ArrowType);
653+
YQL_ENSURE(result.ok());
654+
return *result;
643655
} else {
644656
YQL_ENSURE(arrow::Type::BINARY == blockType->id());
645657
return YsonConverter_.Convert(block);

0 commit comments

Comments
 (0)