Skip to content

Implement mechanism for copying mixin columns without copying data #9009

@taldcroft

Description

@taldcroft

Currently there is no generic mechanism for making a "light" reference copy of mixin columns, i.e. a new object with new meta but with the same data. In the case of making a copy with copy_data=False, Table now uses literally the original object, with ensuing problems:

In [22]: t1 = QTable([[1] * u.m, ['x']])
In [23]: t1['col0'].info.description = 'quant'
In [24]: t1['col1'].info.description = 'column'

In [25]: t2 = t1.copy(copy_data=False)
In [26]: t2['col0'].info.description = 'CHANGED'
In [27]: t2['col1'].info.description = 'CHANGED'

# Original column meta is impacted!
In [28]: t1['col0'].info.description
Out[28]: 'CHANGED'

In [29]: t1['col1'].info.description
Out[29]: 'column'

This needs to be fixed, e.g. for #8077 to work properly.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions