diff options
author | Mikhail Surin <ssmike@ydb.tech> | 2024-11-29 23:40:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-29 20:40:24 +0000 |
commit | be007951ea7a65f582fa68c85ee02017a6fb2e22 (patch) | |
tree | 1b09a58cc6aef62d28688589a8c218ced29afaad | |
parent | a4e7da0f9a7c354bcdabaf6e2f4c38d956aed7d6 (diff) | |
download | ydb-be007951ea7a65f582fa68c85ee02017a6fb2e22.tar.gz |
Choose only ready indices (#12146)
-rw-r--r-- | ydb/core/kqp/opt/logical/kqp_opt_log_ranges_predext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ydb/core/kqp/opt/logical/kqp_opt_log_ranges_predext.cpp b/ydb/core/kqp/opt/logical/kqp_opt_log_ranges_predext.cpp index b84d93da2b..9334605740 100644 --- a/ydb/core/kqp/opt/logical/kqp_opt_log_ranges_predext.cpp +++ b/ydb/core/kqp/opt/logical/kqp_opt_log_ranges_predext.cpp @@ -182,7 +182,7 @@ TExprBase KqpPushExtractedPredicateToReadTable(TExprBase node, TExprContext& ctx if (primaryBuildResult.PointPrefixLen < mainTableDesc.Metadata->KeyColumnNames.size()) { auto maxKey = calcKey(primaryBuildResult, mainTableDesc.Metadata->KeyColumnNames.size(), false, mainTableDesc); for (auto& index : mainTableDesc.Metadata->Indexes) { - if (index.Type != TIndexDescription::EType::GlobalAsync) { + if (index.Type != TIndexDescription::EType::GlobalAsync && index.State == TIndexDescription::EIndexState::Ready) { auto& tableDesc = kqpCtx.Tables->ExistingTable(kqpCtx.Cluster, mainTableDesc.Metadata->GetIndexMetadata(TString(index.Name)).first->Name); auto buildResult = extractor->BuildComputeNode(tableDesc.Metadata->KeyColumnNames, ctx, typesCtx); bool needsJoin = calcNeedsJoin(tableDesc.Metadata); |