Skip to content

Commit a6908cd

Browse files
committed
Add warning
1 parent 5d77a9e commit a6908cd

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

mdio/coordinate_selector.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,22 @@ class CoordinateSelector {
274274

275275
auto non_const_ds = dataset_;
276276

277+
bool is_first_run = true;
278+
277279
for (const auto& desc : kept_runs_) {
278280
MDIO_ASSIGN_OR_RETURN(auto ds, non_const_ds.isel(desc));
279281
MDIO_ASSIGN_OR_RETURN(auto var, ds.variables.get<T>(std::string(descriptor.label.label())));
280282
auto fut = var.Read();
281283
MDIO_ASSIGN_OR_RETURN(auto intervals, var.get_intervals());
284+
285+
if (is_first_run) {
286+
is_first_run = false;
287+
if (intervals.size() != kept_runs_[0].size()) {
288+
std::cout << "WARNING: Different coordinate dimensions detected. This behavior is not yet supported." << std::endl;
289+
std::cout << "\tFor expected behavior, please ensure all previous dimensions are less than or equal to the current dimension." << std::endl;
290+
}
291+
}
292+
282293
stored_intervals.push_back(std::move(intervals)); // Just to ensure nothing gets freed prematurely.
283294
MDIO_ASSIGN_OR_RETURN(auto resolution, _resolve_future<T>(fut));
284295
auto data = std::get<0>(resolution);

0 commit comments

Comments
 (0)