Skip to content

Commit b113841

Browse files
committed
fix(ksql-driver): Drop table with the topic to avoid orphaned topics
1 parent aea2daf commit b113841

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/cubejs-ksql-driver/src/KsqlDriver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from '@cubejs-backend/shared';
1111
import {
1212
BaseDriver, DriverCapabilities,
13-
DriverInterface,
13+
DriverInterface, QueryOptions,
1414
} from '@cubejs-backend/base-driver';
1515
import { Kafka } from 'kafkajs';
1616
import sqlstring, { format as formatSql } from 'sqlstring';
@@ -320,7 +320,7 @@ export class KsqlDriver extends BaseDriver implements DriverInterface {
320320

321321
public dropTable(tableName: string, options: any): Promise<any> {
322322
return this.dropTableMutex.runExclusive(
323-
async () => super.dropTable(this.quoteIdentifier(this.tableDashName(tableName)), options)
323+
async () => this.query(`DROP TABLE ${this.quoteIdentifier(this.tableDashName(tableName))} DELETE TOPIC`, [], options)
324324
);
325325
}
326326

0 commit comments

Comments
 (0)