-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Insert into values throws an error on a table without a key #3021
Comments
@purplefox can you also take a look at this related issue please? |
I've tried to reproduce this. I don't get the error message as reported above, but I do get a different one. Will investigate further:
|
As the CT statement doesn't define a key field in the In that sense this is related to #3349 For tables we probably shouldn't allow users to insert with |
The previous error message I was getting because the schema registry was not running. When I run with confluent platform, I cannot reproduce this error, and the insert seem to proceed fine:
test3 is a newly created topic in the above. |
I'm going to close this as cannot reproduce. I assume the underlying issue has been fixed by another change recently. If anyone can reproduce it, please re-open. |
Reopening as this is definitely still an issue - we should not allow producing data to tables with null keys, as we do not support null keys in tables. |
Steps to reproduce, (running against 5.1 CP started with -- look mum, no KEY set in WITH clause:
ksql> create table Trades(TradeId string, AccountId string, Amount double) with (KAFKA_TOPIC = 'TradeHistory', VALUE_FORMAT = 'JSON', PARTITIONS=1);
Table created
-- When we:
ksql> INSERT INTO Trades (RowKey, AccountId, Amount) VALUES ('t1', 'acc1', 106.0);
Failed to insert values into 'TRADES'.
Caused by: Producer is closed forcefully. Logs server side say:
|
Fixes: confluentinc#3021 Tables do not support rows with `null` keys, so we should not allow users to insert rows with `null` keys.
* fix: do not allow inserts into tables with null key Fixes: #3021 Tables do not support rows with `null` keys, so we should not allow users to insert rows with `null` keys.
KSQL recently relaxed the need to specify a key for a table. This seems to cause
insert into values
to throw a strange error:Notably, this works when I specify a key for the table:
The text was updated successfully, but these errors were encountered: