ratt-ru / dask-ms

Implementation of a dask/xarray dataset backed by a CASA MS
https://dask-ms.readthedocs.io
Other
19 stars 7 forks source link

Fail if ROWID shape and chunks don't match associated dataset arrays #239

Closed sjperkins closed 2 years ago

sjperkins commented 2 years ago

Closes #238

sjperkins commented 2 years ago

Running this PR on the reproducer in #239 now results in the following error:

Traceback (most recent call last):
  File "tmp/repro.py", line 26, in <module>
    writes = xds_to_table(xds, ms_name, columns=["BROKEN_DATA"])
  File "/home/simon/code/dask-ms/daskms/dask_ms.py", line 96, in xds_to_table
    out_ds = write_datasets(table_name, xds, columns,
  File "/home/simon/code/dask-ms/daskms/writes.py", line 725, in write_datasets
    write_datasets = _write_datasets(table, tp, datasets, columns,
  File "/home/simon/code/dask-ms/daskms/writes.py", line 629, in _write_datasets
    raise ValueError(f"ROWID shape and chunking does not "
ValueError: ROWID shape and chunking does not match that of BROKEN_DATA
sjperkins commented 2 years ago

Thanks for the review!