4paradigm / 4paradigm/OpenMLDB

Empty tables use group functions to prompt empty set

Đang mở
#1,079 0 bình luận 0 reaction 1 người được giao Được giao cho @jingchen2222 Xem trên GitHub
bug
Ngôn ngữ chính
C++
Star
1.7k
Fork
331
Merge trung bình
12 ngày 12 giờ
Pull request đã merge (30 ngày)
1

Mô tả

Empty tables use group functions to prompt empty set

## Expected Behavior
count(*) => 0

## Current Behavior
empty set

## case
```yaml
- id: 3
desc: "表是空的"
tags: ["TODO","@chengjing,bug,"]
inputs:
-
columns : ["id bigint","c1 string","c2 int","c7 timestamp"]
indexs: ["index1:c1:c7"]
sql: select count(c2) as v1,max(c2) as v2,min(c2) as v3,avg(c2) as v4,sum(c2) as v5 from {0};
expect:
order: c1
columns: ["v1 int","v2 int","v3 int","v4 double","v5 bigint"]
rows:
- [0,0,0,0,0]
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

The issue includes a test case in YAML showing that aggregate functions (count, max, min, avg, sum) on an empty table return 'empty set' instead of zeros. Look for the SQL execution engine code handling aggregate functions and empty result sets. Run the provided test to reproduce the issue, then examine how aggregate functions compute results when no rows are present.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
sql
Lĩnh vực
databases
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.