Skip to content

Commit 4daf125

Browse files
jmcphersjjallaire
authored andcommitted
avoid range filtering on extremely large numeric values (unsupported)
1 parent 4afa5f0 commit 4daf125

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/cpp/session/modules/SessionDataViewer.R

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,19 @@
117117
{
118118
col_min <- round(min(minmax_vals), 5)
119119
col_max <- round(max(minmax_vals), 5)
120-
if (col_min < col_max)
120+
121+
# if the base value is 16 digits or larger, it's going to get
122+
# serialized in such a way that we can't parse it (either with a
123+
# trailing "." or with a e+xx exponent), so disable filtering
124+
col_min_c <- as.character(trunc(col_min))
125+
col_max_c <- as.character(trunc(col_max))
126+
if (nchar(col_min_c) >= 16 || grepl("e", col_min_c, fixed = TRUE) ||
127+
nchar(col_max_c) >= 16 || grepl("e", col_max_c, fixed = TRUE))
128+
{
129+
col_min <- 0
130+
col_max <- 0
131+
}
132+
else if (col_min < col_max)
121133
{
122134
col_type <- "numeric"
123135
col_search_type <- "numeric"

0 commit comments

Comments
 (0)