Skip to content

Commit

Permalink
Fixed EstimateReadSize
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriyPA committed May 14, 2024
1 parent 26d0105 commit f281fd6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ydb/core/kqp/provider/yql_kikimr_opt_build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,17 +296,19 @@ bool IsDqRead(const TExprBase& node, TExprContext& ctx, TTypeAnnotationContext&
auto dataSourceProviderIt = types.DataSourceMap.find(dataSourceCategory);
if (dataSourceProviderIt != types.DataSourceMap.end()) {
if (auto* dqIntegration = dataSourceProviderIt->second->GetDqIntegration()) {
if (dqIntegration->CanRead(*node.Ptr(), ctx) &&
(!estimateReadSize || dqIntegration->EstimateReadSize(
if (!dqIntegration->CanRead(*node.Ptr(), ctx)) {
if (!node.Ref().IsCallable(ConfigureName) && hasErrors) {
*hasErrors = true;
}
return false;
}
if (!estimateReadSize || dqIntegration->EstimateReadSize(
TDqSettings::TDefault::DataSizePerJob,
TDqSettings::TDefault::MaxTasksPerStage,
{node.Raw()},
ctx))) {
ctx)) {
return true;
}
if (!node.Ref().IsCallable(ConfigureName) && hasErrors) {
*hasErrors = true;
}
}
}
}
Expand Down

0 comments on commit f281fd6

Please sign in to comment.