@@ -312,27 +312,28 @@ function modify!(ds::AbstractDataset, @nospecialize(args...); threads::Bool = tr
312
312
end
313
313
314
314
# we must take care of all possible types, because, fallback is slow
315
- _is_scalar (:: T , sz) where T <: Number = true
316
- _is_scalar (:: Missing , sz) = true
317
- _is_scalar (:: T , sz) where T <: Tuple = true
318
- _is_scalar (:: TimeType , sz) = true
319
- _is_scalar (:: T , sz) where T <: AbstractString = true
315
+ # _is_scalar(::T, sz) where T <: Number = true
316
+ # _is_scalar(::Missing, sz) = true
317
+ # _is_scalar(::T, sz) where T <: Tuple = true
318
+ # _is_scalar(::TimeType, sz) = true
319
+ # _is_scalar(::T, sz) where T <: AbstractString = true
320
+ _is_scalar (x, sz) = true
320
321
_is_scalar (x:: T , sz) where T <: AbstractVector = length (x) != sz
321
322
322
- # TODO can we memorise this and avoid calling it repeatedly in a sesssion
323
- _is_scalar_barrier (:: Val{T} ) where T = hasmethod (size, (T,))
324
-
325
- function _is_scalar (_res:: T , sz) where T
326
- resize_col = false
327
- if _is_scalar_barrier (Val (T))
328
- if size (_res) == () || size (_res,1 ) != sz
329
- resize_col = true
330
- end
331
- else
332
- resize_col = true
333
- end
334
- return resize_col
335
- end
323
+ # # TODO can we memorise this and avoid calling it repeatedly in a sesssion
324
+ # _is_scalar_barrier(::Val{T}) where T = hasmethod(size, (T,))
325
+ #
326
+ # function _is_scalar(_res::T, sz) where T
327
+ # resize_col = false
328
+ # if _is_scalar_barrier(Val(T))
329
+ # if size(_res) == () || size(_res,1) != sz
330
+ # resize_col = true
331
+ # end
332
+ # else
333
+ # resize_col = true
334
+ # end
335
+ # return resize_col
336
+ # end
336
337
337
338
function _resize_result! (ds, _res, newcol)
338
339
resize_col = _is_scalar (_res, nrow (ds))
0 commit comments