Skip to content

Commit a99cfd2

Browse files
authored
Revert "DPL Analysis: add exception for unsorted unassigned groups (#7998)"
This reverts commit 8818ea6.
1 parent 5ad5bf2 commit a99cfd2

1 file changed

Lines changed: 4 additions & 20 deletions

File tree

Framework/Core/include/Framework/Kernels.h

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -81,30 +81,14 @@ auto sliceByColumn(
8181
for (auto i = 0; i < column->num_chunks(); ++i) {
8282
T prev = 0;
8383
T cur = 0;
84-
T lastNeg = 0;
85-
T lastPos = 0;
86-
8784
auto array = static_cast<arrow::NumericArray<typename detail::ConversionTraits<T>::ArrowType>>(column->chunk(i)->data());
8885
for (auto e = 0; e < array.length(); ++e) {
89-
prev = cur;
90-
if (prev >= 0) {
91-
lastPos = prev;
92-
} else {
93-
lastNeg = prev;
86+
if (cur >= 0) {
87+
prev = cur;
9488
}
9589
cur = array.Value(e);
96-
if (cur >= 0) {
97-
if (lastPos > cur) {
98-
throw runtime_error_f("Table %s index %s is not sorted: next value %d < previous value %d!", target, key, cur, lastPos);
99-
} else if (lastPos == cur && prev < 0) {
100-
throw runtime_error_f("Table %s index %s has a group with index %d that is split by %d", target, key, cur, prev);
101-
}
102-
} else {
103-
if (lastNeg < cur) {
104-
throw runtime_error_f("Table %s index %s is not sorted: next negative value %d > previous negative value %d!", target, key, cur, lastNeg);
105-
} else if (lastNeg == cur && prev >= 0) {
106-
throw runtime_error_f("Table %s index %s has a group with index %d that is split by %d", target, key, cur, prev);
107-
}
90+
if (cur >= 0 && prev > cur) {
91+
throw runtime_error_f("Table %s index %s is not sorted: next value %d < previous value %d!", target, key, cur, prev);
10892
}
10993
}
11094
}

0 commit comments

Comments
 (0)