CREATE OR REPLACE TABLE AS does not work #8104
Labels
bug
P0
Denotes must-have for a given milestone
streaming-engine
Tickets owned by the ksqlDB Streaming Team
Milestone
Describe the bug
CREATE OR REPLACE
on an existing CTAS statement fails, giving the following error message:Unable to initialize state, this can happen if multiple instances of Kafka Streams are running in the same state directory
This occurs on master and ksqlDB 0.20.0.
To Reproduce
-Issue a persistent query that creates a table
-Try to create or replace that table.
You can issue these statements exactly to reproduce:
CREATE TABLE tbl_cs (i INTEGER PRIMARY KEY, val STRING) WITH (kafka_topic='tbl', value_format='json',partitions=1);
CREATE TABLE tbl_csas AS SELECT * FROM tbl_cs EMIT CHANGES;
CREATE OR REPLACE TABLE tbl_csas AS SELECT * FROM tbl_cs EMIT CHANGES; --errors with: "Unable to initialize state, this can happen if multiple instances of Kafka Streams are running in the same state directory"
Expected behavior
The
CREATE OR REPLACE
statement executes successfully, using the old table's state store.Actual behaviour
Unable to initialize state, this can happen if multiple instances of Kafka Streams are running in the same state directory
occurs, theCREATE OR REPLACE
is not executed and the table is not replaced.The text was updated successfully, but these errors were encountered: