On Mon, Nov 23, 2020 at 09:31:54AM +0800, Luan Shengde wrote:
@@ -116,7 +116,7 @@ def combine_group_query_data(query_data, dims) job_list = query_data['hits']['hits'] groups = auto_group(job_list, dims) groups.each do |group_key, value|
- if value.size < 2
- if value.size < 1
case the value.size < 1, means there is nothing in the value, how about use use value.empty?
Thanks, Luan Shengde
good!
Thanks, Kaiyi
groups.delete(group_key) next end
diff --git a/lib/params_group.rb b/lib/params_group.rb index 40191a9..48d651b 100644 --- a/lib/params_group.rb +++ b/lib/params_group.rb @@ -34,8 +34,7 @@ def auto_group(jobs_list, dimensions) return [] if dimensions.empty?
jobs_list = extract_jobs_list(jobs_list)
- groups = group(jobs_list, dimensions)
- return remove_singleton(groups)
- group(jobs_list, dimensions)
end
def extract_jobs_list(jobs_list)
2.23.0