Skip to content

Commit 741d329

Browse files
committed
Update to fix discrepency between C++ and Python on tsw
1 parent e69340b commit 741d329

2 files changed

Lines changed: 2 additions & 13 deletions

File tree

cpp/src/cpp/types/tsw.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,7 @@ namespace hgraph
204204
}
205205

206206
bool TimeSeriesWindowInput::all_valid() const {
207-
if (!valid()) return false;
208-
if (auto *f = as_fixed_output()) return f->len() >= f->min_size();
209-
if (auto *t = as_time_output()) {
210-
// For time windows, check if enough time has passed
211-
auto elapsed =
212-
owning_graph()->evaluation_time() - owning_graph()->evaluation_engine_api()->start_time();
213-
return elapsed >= t->min_size();
214-
}
215-
return false;
207+
return output() != nullptr && output()->all_valid();
216208
}
217209

218210
nb::object TimeSeriesWindowInput::py_value_times() const {
@@ -314,8 +306,6 @@ namespace hgraph
314306
}
315307

316308
_roll();
317-
if (_buffer.empty()) return nb::none();
318-
319309
// Convert deque to Python list
320310
nb::list result;
321311
for (const auto& v : _buffer) {
@@ -374,7 +364,6 @@ namespace hgraph
374364

375365
nb::object TimeSeriesTimeWindowOutput::py_value_times() const {
376366
_roll();
377-
if (_times.empty()) return nb::none();
378367
std::vector<engine_time_t> out(_times.begin(), _times.end());
379368
return nb::cast(out);
380369
}

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)