Skip to content

Commit ebe3126

Browse files
committed
Choose only ready indices (ydb-platform#12146)
1 parent 81205ac commit ebe3126

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ydb/core/kqp/opt/logical/kqp_opt_log_ranges_predext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ TExprBase KqpPushExtractedPredicateToReadTable(TExprBase node, TExprContext& ctx
331331
if (primaryBuildResult.PointPrefixLen < mainTableDesc.Metadata->KeyColumnNames.size()) {
332332
auto maxKey = calcKey(primaryBuildResult, mainTableDesc.Metadata->KeyColumnNames.size(), false, mainTableDesc);
333333
for (auto& index : mainTableDesc.Metadata->Indexes) {
334-
if (index.Type != TIndexDescription::EType::GlobalAsync) {
334+
if (index.Type != TIndexDescription::EType::GlobalAsync && index.State == TIndexDescription::EIndexState::Ready) {
335335
auto& tableDesc = kqpCtx.Tables->ExistingTable(kqpCtx.Cluster, mainTableDesc.Metadata->GetIndexMetadata(TString(index.Name)).first->Name);
336336
auto buildResult = extractor->BuildComputeNode(tableDesc.Metadata->KeyColumnNames, ctx, typesCtx);
337337
bool needsJoin = calcNeedsJoin(tableDesc.Metadata);

0 commit comments

Comments
 (0)