From a99cfd280a3c4ada36c06e4a8b5c3af8aac77697 Mon Sep 17 00:00:00 2001 From: Jan Fiete Date: Wed, 26 Jan 2022 18:53:48 +0100 Subject: [PATCH] Revert "DPL Analysis: add exception for unsorted unassigned groups (#7998)" This reverts commit 8818ea6cadfd4ecd6cd40112a7fc5438653b1f88. --- Framework/Core/include/Framework/Kernels.h | 24 ++++------------------ 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/Framework/Core/include/Framework/Kernels.h b/Framework/Core/include/Framework/Kernels.h index 1355968559868..3a5d06bfb0dc3 100644 --- a/Framework/Core/include/Framework/Kernels.h +++ b/Framework/Core/include/Framework/Kernels.h @@ -81,30 +81,14 @@ auto sliceByColumn( for (auto i = 0; i < column->num_chunks(); ++i) { T prev = 0; T cur = 0; - T lastNeg = 0; - T lastPos = 0; - auto array = static_cast::ArrowType>>(column->chunk(i)->data()); for (auto e = 0; e < array.length(); ++e) { - prev = cur; - if (prev >= 0) { - lastPos = prev; - } else { - lastNeg = prev; + if (cur >= 0) { + prev = cur; } cur = array.Value(e); - if (cur >= 0) { - if (lastPos > cur) { - throw runtime_error_f("Table %s index %s is not sorted: next value %d < previous value %d!", target, key, cur, lastPos); - } else if (lastPos == cur && prev < 0) { - throw runtime_error_f("Table %s index %s has a group with index %d that is split by %d", target, key, cur, prev); - } - } else { - if (lastNeg < cur) { - throw runtime_error_f("Table %s index %s is not sorted: next negative value %d > previous negative value %d!", target, key, cur, lastNeg); - } else if (lastNeg == cur && prev >= 0) { - throw runtime_error_f("Table %s index %s has a group with index %d that is split by %d", target, key, cur, prev); - } + if (cur >= 0 && prev > cur) { + throw runtime_error_f("Table %s index %s is not sorted: next value %d < previous value %d!", target, key, cur, prev); } } }