4paradigm / 4paradigm/OpenMLDB

long window: count where op with a rows bucket based pre-agg table may produce incorrect result

Open
#2,313 1 comment 0 reactions 1 assignee Claimed by @aceforeverd View on GitHub
execute-engine storage-engine
Dominant language
C++
Stars
1.7k
Forks
331
Avg merge
12d 12h
Merged PRs (30d)
1

Description

**Describe the feature you'd like**

```sql
deploy dp options (long_windows = 'w1:3')
select count_where(.....
```

`3` as a rows based bucket size, since there is a extra filter key for pre-agg table added, rows in pre-agg table, where their
ts_begin and ts_end value, are not aligned.

currently, this op (`*_where with rows bucket`) is turned off in #2255 -> compile time error

**Additional context**

Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

Research direction

The issue mentions a pre-aggregation table with misaligned timestamps causing incorrect results for count_where operations with row-based buckets. Start by examining the code changes in #2255 that disabled this operation. Look for the long window implementation and pre-agg table handling, particularly around filter keys and bucket alignment. Running existing tests related to long windows and pre-agg tables will help understand the failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.