4paradigm / 4paradigm/OpenMLDB

count_where over whole table in offline mode: project type kAggregation not supported

オープン
#2,441 コメント 1 件 リアクション 0 件 担当者 1 名 @tobegit3hub に割り当て済み GitHub で見る
batch-engine enhancement
主要言語
C++
スター
1.7k
フォーク
331
平均マージ
12日 12時間
マージ済み PR(30日)
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。