Skip to content

Commit be00795

Browse files
authored
Choose only ready indices (#12146)
1 parent a4e7da0 commit be00795

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ TExprBase KqpPushExtractedPredicateToReadTable(TExprBase node, TExprContext& ctx
182182
if (primaryBuildResult.PointPrefixLen < mainTableDesc.Metadata->KeyColumnNames.size()) {
183183
auto maxKey = calcKey(primaryBuildResult, mainTableDesc.Metadata->KeyColumnNames.size(), false, mainTableDesc);
184184
for (auto& index : mainTableDesc.Metadata->Indexes) {
185-
if (index.Type != TIndexDescription::EType::GlobalAsync) {
185+
if (index.Type != TIndexDescription::EType::GlobalAsync && index.State == TIndexDescription::EIndexState::Ready) {
186186
auto& tableDesc = kqpCtx.Tables->ExistingTable(kqpCtx.Cluster, mainTableDesc.Metadata->GetIndexMetadata(TString(index.Name)).first->Name);
187187
auto buildResult = extractor->BuildComputeNode(tableDesc.Metadata->KeyColumnNames, ctx, typesCtx);
188188
bool needsJoin = calcNeedsJoin(tableDesc.Metadata);

0 commit comments

Comments
 (0)