diff options
author | Roman Udovichenko <rvu@ydb.tech> | 2024-07-08 16:26:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-08 13:26:22 +0000 |
commit | 7b59fef4b87276a539d87e08791efbe6a60edc0f (patch) | |
tree | 082c31107f70f70eebf5f80d71a0db8fa7c145ce | |
parent | 6e9dd6ac5156f9af648e967854f73d8c631bcd43 (diff) | |
download | ydb-7b59fef4b87276a539d87e08791efbe6a60edc0f.tar.gz |
[dq] Stop early in dq validator (#6333)
-rw-r--r-- | ydb/library/yql/providers/yt/provider/yql_yt_dq_integration.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ydb/library/yql/providers/yt/provider/yql_yt_dq_integration.cpp b/ydb/library/yql/providers/yt/provider/yql_yt_dq_integration.cpp index 435f8d5d61..cec5d59003 100644 --- a/ydb/library/yql/providers/yt/provider/yql_yt_dq_integration.cpp +++ b/ydb/library/yql/providers/yt/provider/yql_yt_dq_integration.cpp @@ -489,7 +489,7 @@ public: if (!State_->Configuration->UseRPCReaderInDQ.Get(maybeRead.Cast().DataSource().Cluster().StringValue()).GetOrElse(DEFAULT_USE_RPC_READER_IN_DQ)) { return false; } - + auto supportedTypes = State_->Configuration->BlockReaderSupportedTypes.Get(maybeRead.Cast().DataSource().Cluster().StringValue()).GetOrElse(DEFAULT_BLOCK_READER_SUPPORTED_TYPES); auto supportedDataTypes = State_->Configuration->BlockReaderSupportedDataTypes.Get(maybeRead.Cast().DataSource().Cluster().StringValue()).GetOrElse(DEFAULT_BLOCK_READER_SUPPORTED_DATA_TYPES); const auto structType = GetSeqItemType(maybeRead.Raw()->GetTypeAnn()->Cast<TTupleExprType>()->GetItems().back())->Cast<TStructExprType>(); @@ -586,15 +586,15 @@ public: } if (tableInfo->Stat) { chunksCount += tableInfo->Stat->ChunkCount; + if (chunksCount > maxChunks) { + AddErrorWrap(ctx, node_->Pos(), TStringBuilder() << "table with too many chunks: " << chunksCount << " > " << maxChunks); + return Nothing(); + } } } groupIdPathInfo.back().emplace_back(pathInfo); } } - if (chunksCount > maxChunks) { - AddErrorWrap(ctx, node_->Pos(), TStringBuilder() << "table with too many chunks: " << chunksCount << " > " << maxChunks); - return Nothing(); - } clusterToNodesAndErasure[cluster].push_back({node_, hasErasure}); } else { AddErrorWrap(ctx, node_->Pos(), TStringBuilder() << "unsupported callable: " << node_->Content()); @@ -653,7 +653,7 @@ public: TYtTableBaseInfo::TPtr tableInfo{TYtTableBaseInfo::Parse(table)}; auto codecSpec = tableInfo->GetCodecSpecNode({}); TString rowSpec = NodeToYsonString(codecSpec, NYT::NYson::EYsonFormat::Text); - + NYt::NSource::TLookupSource source; source.SetCluster(table.Cluster().StringValue()); source.SetTable(table.Name().StringValue()); |