Skip to content

Commit 271300b

Browse files
authored
fix(query): Fix drop Aggregating index failed (#19131)
* fix(query): Fix drop Aggregating index failed * fix * fix
1 parent ae93355 commit 271300b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/query/sql/src/planner/binder/ddl/index.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,10 @@ impl Binder {
296296
) -> Result<Plan> {
297297
let DropIndexStmt { if_exists, index } = stmt;
298298

299+
let index_name = self.normalize_object_identifier(index);
299300
let plan = DropIndexPlan {
300301
if_exists: *if_exists,
301-
index: index.to_string(),
302+
index: index_name,
302303
};
303304
Ok(Plan::DropIndex(Box::new(plan)))
304305
}

tests/sqllogictests/suites/query/index/02_aggregating_index/02_0004_ddl_create_drop_index.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,15 @@ CREATE OR REPLACE AGGREGATING INDEX replace_idx AS SELECT b, SUM(a) FROM t1 WHER
5656
statement ok
5757
DROP AGGREGATING INDEX replace_idx
5858

59+
statement ok
60+
CREATE AGGREGATING INDEX "Test.agg.idx" AS SELECT SUM(a), b FROM t1 WHERE b > 3 GROUP BY b
61+
62+
statement ok
63+
DROP AGGREGATING INDEX "Test.agg.idx"
64+
5965
statement ok
6066
USE default
6167

6268
statement ok
6369
DROP DATABASE IF EXISTS test_index_db
70+

0 commit comments

Comments
 (0)