Skip to content

Broken when subsetting data table #871

@sunnyghk

Description

@sunnyghk

Recently I have upgraded to data.table 1.9.4, and notice the subsetting is broken when the column name is 'class'. It can be resolve by setting datatable.auto.index to FALSE, but nonetheless is causing a pretty major problem:

test = data.table(class=c('a','b'), x=c(1,2))
test[class=='a']
Error in setattr(attr(x, "index"), paste(cols, collapse = "__"), o) :
attempt to set invalid 'class' attribute
options(datatable.auto.index=FALSE)
test[class=='a']
class x
1: a 1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions