diff --git a/src/ast2ram/utility/SipsMetric.cpp b/src/ast2ram/utility/SipsMetric.cpp index fb94638d0db..3fe3feb1ebe 100644 --- a/src/ast2ram/utility/SipsMetric.cpp +++ b/src/ast2ram/utility/SipsMetric.cpp @@ -131,7 +131,12 @@ std::vector SelingerProfileSipsMetric::getReordering( auto sccAtoms = filter(ast::getBodyLiterals(*clause), [&](auto* atom) { return contains(sccRelations, program.getRelation(*atom)); }); - assert(profileUseAnalysis->hasAutoSchedulerStats() && "Must have stats in order to auto-schedule!"); + if (!profileUseAnalysis->hasAutoSchedulerStats()) { + std::vector res; + res.resize(atoms.size()); + std::iota(res.begin(), res.end(), 0); + return res; + } auto* prof = profileUseAnalysis; auto getJoinSize = [&prof](bool isRecursive, const std::string& rel, std::set joinKeys,