From 379e7e12d386fd53301d367b012d3b175c4e3c0f Mon Sep 17 00:00:00 2001 From: Oren Ben-Kiki Date: Thu, 11 Apr 2024 10:28:26 +0300 Subject: [PATCH] Allow counting of strings. --- docs/v0.1.0/.documenter-siteinfo.json | 2 +- src/operations.jl | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/v0.1.0/.documenter-siteinfo.json b/docs/v0.1.0/.documenter-siteinfo.json index 07f25f5..246c9c7 100644 --- a/docs/v0.1.0/.documenter-siteinfo.json +++ b/docs/v0.1.0/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-10T20:22:24","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-11T10:26:28","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/src/operations.jl b/src/operations.jl index 6c23fdc..4872cca 100644 --- a/src/operations.jl +++ b/src/operations.jl @@ -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