Closed chiraganand closed 1 year ago
This issue is not related to TSFrames. We can reproduce this using any struct.
struct foo
a::Any
end
x=foo(:bar) # we use a symbol because length is not defined for a symbol
y=foo([1 2])
julia> Tables.rowcount(x)
ERROR: MethodError: no method matching length(::Symbol)
#truncated output
julia> Tables.rowcount(y)
2
Possible fixes:
This issue is not related to TSFrames. We can reproduce this using any struct.
struct foo a::Any end x=foo(:bar) # we use a symbol because length is not defined for a symbol y=foo([1 2]) julia> Tables.rowcount(x) ERROR: MethodError: no method matching length(::Symbol) #truncated output julia> Tables.rowcount(y) 2
Possible fixes:
1. Write our own rowcount which takes TSFrame.
I feel this is going to be a proper solution.
2. Fix Tables.rowcount to take a restricted type instead of Any.
Can't change Tables.rowcount as it is a generic method for any table type so implementing our own rowcount() is the only fix.
rowcount()
isn't implemented but somehow it throws a non-no-method error:whereas, this works: