Skip to content

Commit

Permalink
Choose only ready indices (#12146)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssmike authored Nov 29, 2024
1 parent a4e7da0 commit be00795
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ydb/core/kqp/opt/logical/kqp_opt_log_ranges_predext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit be00795

Please sign in to comment.