File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
ydb/library/yql/providers/yt/comp_nodes/dq Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -619,8 +619,15 @@ class TYtColumnConverter final : public IYtColumnConverter {
619
619
620
620
arrow::Datum Convert (std::shared_ptr<arrow::ArrayData> block) override {
621
621
if (arrow::Type::DICTIONARY == block->type ->id ()) {
622
- if (static_cast <const arrow::DictionaryType&>(*block->type ).value_type ()->Equals (Settings_.ArrowType )) {
622
+ auto valType = static_cast <const arrow::DictionaryType&>(*block->type ).value_type ();
623
+ if (valType->Equals (Settings_.ArrowType )) {
624
+ // just unpack
623
625
return DictPrimitiveConverter_.Convert (block);
626
+ } else if (arrow::Type::UINT8 == Settings_.ArrowType ->id () && arrow::Type::BOOL == valType->id ()) {
627
+ // unpack an cast
628
+ auto result = arrow::compute::Cast (DictPrimitiveConverter_.Convert (block), Settings_.ArrowType );
629
+ YQL_ENSURE (result.ok ());
630
+ return *result;
624
631
} else {
625
632
return DictYsonConverter_.Convert (block);
626
633
}
@@ -631,7 +638,7 @@ class TYtColumnConverter final : public IYtColumnConverter {
631
638
return block;
632
639
} else if (arrow::Type::UINT8 == Settings_.ArrowType ->id () && arrow::Type::BOOL == blockType->id ()) {
633
640
auto result = arrow::compute::Cast (arrow::Datum (*block), Settings_.ArrowType );
634
- Y_ENSURE (result.ok ());
641
+ YQL_ENSURE (result.ok ());
635
642
return *result;
636
643
} else {
637
644
YQL_ENSURE (arrow::Type::BINARY == blockType->id ());
You can’t perform that action at this time.
0 commit comments