Skip to content

Commit 8ec2a59

Browse files
committed
Forbid DefaultValues with block input
commit_hash:471951f3059579994545110e5d381952e3b43a3d
1 parent 487f308 commit 8ec2a59

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

yt/yql/providers/yt/codec/yt_codec_io.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,6 +1610,9 @@ class TArrowDecoder : public TMkqlReaderImpl::TDecoder {
16101610

16111611
void HandleTableSwitch() {
16121612
auto& decoder = Specs_.Inputs[TableIndex_];
1613+
for (auto& defVal : decoder->DefaultValues) {
1614+
YQL_ENSURE(!defVal, "Default values are not supported by Arrow decoder");
1615+
}
16131616

16141617
ColumnConverters_.clear();
16151618
ColumnConverters_.reserve(decoder->FieldsVec.size());
@@ -1795,7 +1798,9 @@ void TMkqlReaderImpl::Next() {
17951798

17961799
// Unretrieable part
17971800
auto& decoder = *Specs_->Inputs[Decoder_->TableIndex_];
1798-
if (Specs_->UseSkiff_) {
1801+
if (Specs_->UseBlockInput_) {
1802+
return;
1803+
} else if (Specs_->UseSkiff_) {
17991804
if (decoder.OthersStructIndex && *decoder.OthersStructIndex != Max<ui32>()) {
18001805
items[*decoder.OthersStructIndex] = BuildOthers(decoder, *others);
18011806
}
@@ -1834,9 +1839,7 @@ void TMkqlReaderImpl::Next() {
18341839
}
18351840
}
18361841

1837-
if (Decoder_->HandlesSysColumns_) {
1838-
return;
1839-
}
1842+
YQL_ENSURE(!Decoder_->HandlesSysColumns_);
18401843

18411844
if (decoder.FillSysColumnPath) {
18421845
items[*decoder.FillSysColumnPath] = Specs_->TableNames.at(Decoder_->TableIndex_);

yt/yql/providers/yt/provider/yql_yt_helpers.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2398,9 +2398,15 @@ bool IsYtTableSuitableForArrowInput(NNodes::TExprBase tableNode, std::function<v
23982398
}
23992399

24002400
auto rowSpec = TYtTableBaseInfo::GetRowSpec(tableNode);
2401-
if (rowSpec && !rowSpec->StrictSchema) {
2402-
unsupportedHandler("can't use arrow input on tables with non-strict schema");
2403-
return false;
2401+
if (rowSpec) {
2402+
if (!rowSpec->StrictSchema) {
2403+
unsupportedHandler("can't use arrow input on tables with non-strict schema");
2404+
return false;
2405+
}
2406+
if (!rowSpec->DefaultValues.empty()) {
2407+
unsupportedHandler("can't use arrow input on tables with default values");
2408+
return false;
2409+
}
24042410
}
24052411

24062412
return true;

0 commit comments

Comments
 (0)