Skip to content

Commit

Permalink
Allow counting of strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
orenbenkiki committed Apr 11, 2024
1 parent 6536bc9 commit 379e7e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/v0.1.0/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-10T20:22:24","documenter_version":"1.3.0"}}
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-11T10:26:28","documenter_version":"1.3.0"}}
8 changes: 4 additions & 4 deletions src/operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -823,15 +823,15 @@ function Count(operation_name::Token, parameters_values::Dict{String, Token})::C
return Count(dtype)
end

function compute_reduction(operation::Count, input::StorageMatrix{T})::StorageVector where {T <: StorageNumber}
dtype = reduction_result_type(operation, T)
function compute_reduction(operation::Count, input::StorageMatrix)::StorageVector
dtype = reduction_result_type(operation, eltype(input))
result = Vector{dtype}(undef, size(input, 2))
result .= size(input, 1)
return result
end

function compute_reduction(operation::Count, input::StorageVector{T})::StorageNumber where {T <: StorageNumber}
dtype = reduction_result_type(operation, T)
function compute_reduction(operation::Count, input::StorageVector)::StorageNumber
dtype = reduction_result_type(operation, eltype(input))
return dtype(length(input))
end

Expand Down

0 comments on commit 379e7e1

Please sign in to comment.