From 76bf0fc6ba927a6590df8d12ccb21c95fe4bc9b7 Mon Sep 17 00:00:00 2001 From: datomo Date: Fri, 13 Dec 2024 19:22:35 +0100 Subject: [PATCH] fixed potential for infinite loop --- .../org/polypheny/db/algebra/metadata/AlgMetadataQuery.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/polypheny/db/algebra/metadata/AlgMetadataQuery.java b/core/src/main/java/org/polypheny/db/algebra/metadata/AlgMetadataQuery.java index 73c6a391b3..9351315737 100644 --- a/core/src/main/java/org/polypheny/db/algebra/metadata/AlgMetadataQuery.java +++ b/core/src/main/java/org/polypheny/db/algebra/metadata/AlgMetadataQuery.java @@ -45,6 +45,7 @@ import java.util.Objects; import java.util.Optional; import java.util.Set; +import javax.annotation.Nullable; import lombok.extern.slf4j.Slf4j; import org.polypheny.db.algebra.AlgCollation; import org.polypheny.db.algebra.AlgDistribution; @@ -57,7 +58,6 @@ import org.polypheny.db.rex.RexNode; import org.polypheny.db.rex.RexTableIndexRef.AlgTableRef; import org.polypheny.db.util.ImmutableBitSet; -import javax.annotation.Nullable; /** @@ -290,7 +290,7 @@ public AlgOptCost getCumulativeCost( AlgNode alg ) { } catch ( JaninoRelMetadataProvider.NoHandler e ) { cumulativeCostHandler = revise( e.algClass, BuiltInMetadata.CumulativeCost.DEF ); } catch ( CyclicMetadataException e ) { - alg.getCluster().getPlanner().getCostFactory().makeInfiniteCost(); + return alg.getCluster().getPlanner().getCostFactory().makeInfiniteCost(); } } }