h2oai / datatable

A Python package for manipulating 2-dimensional tabular data structures
https://datatable.readthedocs.io
Mozilla Public License 2.0
1.81k stars 154 forks source link

Segfault after removing a key column #2083

Closed oleksiyskononenko closed 4 years ago

oleksiyskononenko commented 4 years ago
import datatable as dt
DT = dt.Frame([[1], [2]])
DT.key = ["C0", "C1"]
del DT[0]
print(DT)

Produces Segmentation fault: 11 / Bus error: 10.

st-pasha commented 4 years ago

Should removing a key column throw an exception, or automatically "unkey" the frame?

oleksiyskononenko commented 4 years ago

"unkey" it automatically and do remove a column sounds like handling exception in one particular way. Who knows, may be a user would need something different in this case. Throwing an exception looks like more flexible solution.