Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

long_window bugs #3836

Open
vagetablechicken opened this issue Mar 27, 2024 · 1 comment · May be fixed by #3908
Open

long_window bugs #3836

vagetablechicken opened this issue Mar 27, 2024 · 1 comment · May be fixed by #3908
Assignees
Labels
storage-engine openmldb storage engine. nameserver & tablet

Comments

@vagetablechicken
Copy link
Collaborator

vagetablechicken commented Mar 27, 2024

meta table and aggr table deletion

workaround

select * from __INTERNAL_DB.PRE_AGG_META_INFO where base_db="db1" and base_table="t1";
-- 一般是删除这张表下所有的aggr表,假设这里查出来了的aggr_table只有一张__PRE_AGG_DB.pre_db1_d1_w1_count_,删表并删除其在meta表的信息
drop table __PRE_AGG_DB.pre_db1_d1_w1_count_;
delete from __INTERNAL_DB.PRE_AGG_META_INFO where aggr_table="pre_db1_d1_w1_count_";

detail

P.S. long window definition can be w1:100(int literal), but if window agg is xx_where, it can't

@vagetablechicken vagetablechicken added the storage-engine openmldb storage engine. nameserver & tablet label Mar 27, 2024
@vagetablechicken vagetablechicken self-assigned this Mar 27, 2024
@vagetablechicken
Copy link
Collaborator Author

vagetablechicken commented Apr 29, 2024

set @@execute_mode='online';
CREATE DATABASE db1;
-- SUCCEED

USE db1;
-- SUCCEED: Database changed

CREATE TABLE demo_table1(c1 string, c2 int, c3 bigint, c4 float, c5 double, c6 timestamp, c7 date);
-- SUCCEED: Create successfully

DEPLOY demo_deploy OPTIONS(long_windows="w1:1d") SELECT c1, sum(c2) OVER w1 FROM demo_table1
    WINDOW w1 AS (PARTITION BY c1 ORDER BY c6 ROWS_RANGE BETWEEN 5d PRECEDING AND CURRENT ROW);
select * from  __INTERNAL_DB.PRE_AGG_META_INFO;
use __PRE_AGG_DB;
show tables;

Then

use db1;
DROP DEPLOYMENT demo_deploy;
DROP TABLE demo_table1;
select * from  __INTERNAL_DB.PRE_AGG_META_INFO;
-- empty
use __PRE_AGG_DB;
show tables;
-- empty

Test on 0.8.0, the aggr table and aggr table entry in meta info table won't be deleted.
After fix, they can be deleted.

@vagetablechicken vagetablechicken linked a pull request Apr 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
storage-engine openmldb storage engine. nameserver & tablet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant