diff --git a/src/jrd/par.cpp b/src/jrd/par.cpp index f2899bcf07..6681bc3287 100644 --- a/src/jrd/par.cpp +++ b/src/jrd/par.cpp @@ -1795,6 +1795,9 @@ static void par_partition_by(thread_db* tdbb, CompilerScratch* csb, jrd_nod*& gr // We have allocated groupNode with bigger length than expressions. This is to use in // OPT_gen_sort. Now fill that info. + + groupNode->nod_type = nod_sort; + for (unsigned i = 0; i < count; ++i) { groupNode->nod_arg[count + i * count + i] = (jrd_nod*)(IPTR) false; // ascending diff --git a/src/jrd/recsrc/WindowedStream.cpp b/src/jrd/recsrc/WindowedStream.cpp index facaa770a4..e24747b4c0 100644 --- a/src/jrd/recsrc/WindowedStream.cpp +++ b/src/jrd/recsrc/WindowedStream.cpp @@ -208,8 +208,8 @@ namespace m_outerKeys(outerKeys), m_innerKeys(innerKeys) { fb_assert(m_outer && m_inner && m_innerKeys->nod_count == m_outerKeys->nod_count); - fb_assert(m_outerKeys && m_outerKeys->nod_type == nod_list); - fb_assert(m_innerKeys && m_innerKeys->nod_type == nod_list); + fb_assert(m_outerKeys && (m_outerKeys->nod_type == nod_list || m_outerKeys->nod_type == nod_sort)); + fb_assert(m_innerKeys && (m_innerKeys->nod_type == nod_list || m_innerKeys->nod_type == nod_sort)); m_impure = CMP_impure(csb, sizeof(Impure)); }