aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraozeritsky <aozeritsky@ydb.tech>2023-09-19 23:27:27 +0300
committeraozeritsky <aozeritsky@ydb.tech>2023-09-19 23:45:44 +0300
commita8bb6c3e287c1a638798f1fc315a222515f8943f (patch)
treed1b5feb9ae8c5c30bccdced6590273b9e8a45f27
parentec05b76b4a9bbd7f35510298508a6435d7c43500 (diff)
downloadydb-a8bb6c3e287c1a638798f1fc315a222515f8943f.tar.gz
Fix read stats in join reorder
-rw-r--r--ydb/library/yql/providers/yt/provider/yql_yt_join_reorder.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/ydb/library/yql/providers/yt/provider/yql_yt_join_reorder.cpp b/ydb/library/yql/providers/yt/provider/yql_yt_join_reorder.cpp
index fef2232ea1c..77984d829aa 100644
--- a/ydb/library/yql/providers/yt/provider/yql_yt_join_reorder.cpp
+++ b/ydb/library/yql/providers/yt/provider/yql_yt_join_reorder.cpp
@@ -191,15 +191,13 @@ private:
auto& rel = Rels[relId - 1];
TYtSection section{leaf->Section};
- if (Y_UNLIKELY(!section.Settings().Empty())) {
+ if (Y_UNLIKELY(!section.Settings().Empty()) && Y_UNLIKELY(section.Settings().Item(0).Name() == "Test")) {
// ut
- if (Y_UNLIKELY(section.Settings().Item(0).Name() == "Test")) {
- for (const auto& setting : section.Settings()) {
- if (setting.Name() == "Rows") {
- rel.Rows += FromString<ui64>(setting.Value().Ref().Content());
- } else if (setting.Name() == "Size") {
- rel.TotalCost += FromString<ui64>(setting.Value().Ref().Content());
- }
+ for (const auto& setting : section.Settings()) {
+ if (setting.Name() == "Rows") {
+ rel.Rows += FromString<ui64>(setting.Value().Ref().Content());
+ } else if (setting.Name() == "Size") {
+ rel.TotalCost += FromString<ui64>(setting.Value().Ref().Content());
}
}
} else {
@@ -208,6 +206,9 @@ private:
rel.TotalCost += stat->DataSize;
rel.Rows += stat->RecordsCount;
}
+ if (!(rel.Rows > 0)) {
+ YQL_CLOG(INFO, ProviderYt) << "Cannot read stats from: " << NCommon::ExprToPrettyString(Ctx, *section.Ptr());
+ }
}
int leafIndex = relId - 1;