You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a column with a constant string. I found that if the nchar of the string is a multiple of 8 an array index out of bounds exception is thrown.
library(data.table)
library(h2o)
h2o.init(port=5551)
h2o.getVersion()
# [1] "3.44.0.3"mt<- as.h2o(mtcars)
mt$test<- paste0(sample(letters, 8, replace=TRUE), collapse="")
# ERROR MESSAGE:## DistributedException from localhost/127.0.0.1:5551: 'Index 142 out of bounds for length 142', caused by # java.lang.ArrayIndexOutOfBoundsException: Index 142 out of bounds for length 142# passing in values of <n> 1:7, 9:15, 17:23, etc. worksmt<- as.h2o(mtcars)
mt$test<- paste0(sample(letters, <n>, replace=TRUE), collapse="")
A workaround is to create the column with nchar %% 8 != 0 and then assign the column again, this time it will work.
The text was updated successfully, but these errors were encountered:
I am trying to create a column with a constant string. I found that if the
nchar
of the string is a multiple of 8 an array index out of bounds exception is thrown.A workaround is to create the column with
nchar
%% 8 != 0 and then assign the column again, this time it will work.The text was updated successfully, but these errors were encountered: