Skip to content

tests failures due to complex NA #5748

@jangorecki

Description

@jangorecki

We are getting more tests failures due to changed behavior of complex NA.
https://cran.r-project.org/web/checks/check_results_data.table.html

 9 errors out of 9917. Search tests/tests.Rraw for test numbers: 1658.58, 1743.231, 1962.0473, 2040.1, 2040.2, 2060.6, 2060.601, 2060.602, 2060.604.

not fixed on master

sudo docker run -it --rm registry.gitlab.com/jangorecki/dockerfiles/r-devel /bin/bash
wget https://rdatatable.github.io/data.table/src/contrib/data.table_1.14.9.tar.gz
R CMD INSTALL data.table_1.14.9.tar.gz

Looks like complex NA support has to be fixed in:

library(data.table)
test = data.table:::test
DT = data.table(a=1:3, b=list(1:4, c(3.14, 100e10), c(3i,4i,5i)))
DT[ , b := c(1i, -1-1i, NA)]
test(1658.58, fwrite(DT), output='a,b\n1,0\\+1i\n2,-1-1i\n3,$')
#Test 1658.58 did not produce correct output:
#Expected: <<a,b\n1,0\\+1i\n2,-1-1i\n3,$>>
#Observed: <<a,b\n1,0+1i\n2,-1-1i\n3,+0i>>
  • fread: 1743.231
test(1743.231, fread("a,b,c\n2,1,4i", colClasses=list(complex="c", integer=2L), drop="a"), data.table(b=1L, c="4i")) ## + warning
  • fcoalesce: 2060.6, 2060.601, 2060.602, 2060.604
  • shift (again?): 2067.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions