4paradigm / 4paradigm/OpenMLDB
count_where over whole table in offline mode: project type kAggregation not supported
- 主要语言
- C++
- 星标
- 1.7k
- 派生
- 331
- 平均合并
- 12 天 12 小时
- 30 天内合并 PR
- 1
描述
**Bug Description**
```
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0906 17:05:28.948508 69395 zk_client.cc:564] zookeeper event with type -1, state 3, path
I0906 17:05:28.948614 69395 zk_client.cc:579] connect success
I0906 17:05:28.948652 69391 db_sdk.cc:216] init zk client with zk options [cluster:10.97.152.110:22181,10.97.152.190:22181,10.97.152.199:22181, path:/openmldb_cluster, zk_session_timeout:2000, log_level:0, log_file:] and session id 1
I0906 17:05:28.953351 69391 client_manager.cc:483] add client. name 10.97.152.110:9527, endpoint
I0906 17:05:28.953372 69391 client_manager.cc:483] add client. name 10.97.152.190:9527, endpoint
I0906 17:05:28.953377 69391 client_manager.cc:483] add client. name 10.97.152.199:9527, endpoint
I0906 17:05:28.957266 69391 db_sdk.cc:233] start to watch notify on table, function, ns leader, taskamanger leader
I0906 17:05:28.958261 69391 db_sdk.cc:55] init ns client with endpoint 10.97.152.110:6527 done
I0906 17:05:28.961437 69391 default_udf_library.cc:46] Creating DefaultUdfLibrary
_____ ______ _ _____ ______
/ ___ \ | ___ \| | (____ \ (____ \
| | | |____ ____ ____ | | _ | | | _ \ \ ____) )
| | | | _ \ / _ ) _ \| || || | | | | | | __ (
| |___| | | | ( (/ /| | | | || || | |_____| |__/ /| |__) )
\_____/| ||_/ \____)_| |_|_||_||_|_______)_____/ |______/
|_|
v0.6.0-01a7a67
10.97.152.110:6527/> use tutorial;
SUCCEED: Database changed
10.97.152.110:6527/tutorial> show variables;
--------------- ---------
Variable_name Value
--------------- ---------
enable_trace false
execute_mode offline
job_timeout 20000
sync_job false
--------------- ---------
4 rows in set
10.97.152.110:6527/tutorial> set @@sync_job=true;
SUCCEED
10.97.152.110:6527/tutorial> select * from t1;
+---+-----+---+-------+-------------------+---------+----------+--------+--------+-----+
| id| uid|mid| cardno| trans_time|trans_amt|trans_type|province| city|label|
+---+-----+---+-------+-------------------+---------+----------+--------+--------+-----+
| 1|UserA| M1|1111111|2022-02-02 10:00:00| 10.0| CASH| SH|ShangHai| true|
| 3|UserA| M2|1111111|2022-02-03 11:00:00| 20.0| POS| SH|ShangHai| true|
| 4|UserA| M3|1111111|2022-02-07 11:00:00| 15.0| POS| SH|ShangHai| true|
| 6|UserA| M1|1111111|2022-02-07 13:00:00| 20.0| CASH| BJ| BeiJing| true|
| 8|UserA| M2|1111111|2022-02-08 11:00:00| 50.0| CASH| BJ| BeiJing| true|
| 9|UserA| M3|1111111|2022-02-08 12:00:00| 100.0| POS| BJ| BeiJing| true|
| 2|UserB| M3|2222222|2022-02-01 11:30:00| 10.0| POS| SH|ShangHai| true|
| 5|UserB| M1|2222222|2022-02-07 10:00:00| 20.0| POS| SH|ShangHai| true|
| 7|UserB| M2|2222222|2022-02-07 12:00:00| 30.0| POS| SH|ShangHai| true|
| 10|UserB| M5|2222222|2022-02-08 11:00:00| 10.0| POS| SH|ShangHai| true|
| 1|UserA| M1|1111111|2022-02-02 10:00:00| 10.0| CASH| SH|ShangHai| true|
| 3|UserA| M2|1111111|2022-02-03 11:00:00| 20.0| POS| SH|ShangHai| true|
| 4|UserA| M3|1111111|2022-02-07 11:00:00| 15.0| POS| SH|ShangHai| true|
| 6|UserA| M1|1111111|2022-02-07 13:00:00| 20.0| CASH| BJ| BeiJing| true|
| 8|UserA| M2|1111111|2022-02-08 11:00:00| 50.0| CASH| BJ| BeiJing| true|
| 9|UserA| M3|1111111|2022-02-08 12:00:00| 100.0| POS| BJ| BeiJing| true|
| 2|UserB| M3|2222222|2022-02-01 11:30:00| 10.0| POS| SH|ShangHai| true|
| 5|UserB| M1|2222222|2022-02-07 10:00:00| 20.0| POS| SH|ShangHai| true|
| 7|UserB| M2|2222222|2022-02-07 12:00:00| 30.0| POS| SH|ShangHai| true|
| 10|UserB| M5|2222222|2022-02-08 11:00:00| 10.0| POS| SH|ShangHai| true|
+---+-----+---+-------+-------------------+---------+----------+--------+--------+-----+
10.97.152.110:6527/tutorial> select count_where(id, mid = 'M1') from t1;
Get exception: Project type kAggregation not supported
10.97.152.110:6527/tutorial> select count_where(id, id = '1') from t1;
Get exception: Project type kAggregation not supported
10.97.152.110:6527/tutorial>
```
**Expected Behavior**
**Steps to Reproduce**
1.
2.
3.
4.
贡献指南
调研方向
The error 'Project type kAggregation not supported' occurs when running count_where over a whole table in offline mode. Look at the SQL execution path for aggregation functions in offline mode, likely in the query planner or execution engine. Check the code handling 'count_where' and project types, starting from the SQL parser and moving to the aggregation logic. Reproduce the issue with the provided steps to see the exact failure point.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- databases, machine-learning, sql
- 领域
- databases, machine-learning
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100