We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe what's wrong
Record with a JSON column seems to not be deleted correctly.
Does it reproduce on recent release?
Yes
How to reproduce
First let's create the table with a JSON column.
CREATE TABLE testJson ( `id` UInt32, `fields` JSON ) ENGINE = ReplicatedMergeTree ORDER BY id SETTINGS index_granularity = 8192
Let's add a row to the table:
INSERT INTO testJson (id, fields) VALUES (1,'{"fieldInteger":1,"fieldBoolean":true,"fieldFloat":1.23,"fieldString":"StringValue"}');
Let's check that the row has been properly inserted.
SELECT * FROM testJson Query id: 62875aa8-67fc-46ee-80b3-382346bbf255 ┌─id─┬─fields───────────────────┐ │ 1 │ (1,1.23,1,'StringValue') │ └────┴──────────────────────────┘ 1 row in set. Elapsed: 0.158 sec.
Then I delete the element
ALTER TABLE testJson DELETE WHERE id = 1 Query id: 288c33ed-75c4-42fc-ac04-bbce2cc325e3 ┌─host──────────────────────────┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐ │ default|host-1 │ 0 │ │ 1 │ 1 │ └───────────────────────────────┴────────┴───────┴─────────────────────┴──────────────────┘ ┌─host──────────────────────────┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐ │ default|host-2 │ 0 │ │ 0 │ 0 │ └───────────────────────────────┴────────┴───────┴─────────────────────┴──────────────────┘ 2 rows in set. Elapsed: 0.366 sec.
Let's verify that the record has been deleted:
The record is still there.
Expected behavior
The row should have been deleted like in the below example:
CREATE TABLE testString ( `id` UInt32, `fields` String ) ENGINE = ReplicatedMergeTree ORDER BY id SETTINGS index_granularity = 8192
Let's insert a row:
INSERT INTO testString (id, fields) VALUES (1,'test');
Let's check that the record is there:
SELECT * FROM testString Query id: b2f8f509-3633-43fc-9be7-a797492df0bb ┌─id─┬─fields─┐ │ 1 │ test │ └────┴────────┘ 1 rows in set. Elapsed: 0.202 sec.
Let's remove it:
ALTER TABLE testJson DELETE WHERE id = 1 Query id: 10ad5930-9102-4297-96c3-ae1fdef09d50 ┌─host──────────────────────────┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐ │ default|host-1 │ 0 │ │ 1 │ 1 │ └───────────────────────────────┴────────┴───────┴─────────────────────┴──────────────────┘ ┌─host──────────────────────────┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐ │ default|host-2│ 0 │ │ 0 │ 0 │ └───────────────────────────────┴────────┴───────┴─────────────────────┴──────────────────┘ 2 rows in set. Elapsed: 0.339 sec.
It's being deleted correctly:
SELECT * FROM testString Query id: fe3c0ea5-cc5a-41c0-be69-04c12d80cd93 Ok. 0 rows in set. Elapsed: 0.156 sec.
The text was updated successfully, but these errors were encountered:
Object
CurtizJ
Successfully merging a pull request may close this issue.
Describe what's wrong
Record with a JSON column seems to not be deleted correctly.
Does it reproduce on recent release?
Yes
How to reproduce
First let's create the table with a JSON column.
Let's add a row to the table:
Let's check that the row has been properly inserted.
Then I delete the element
Let's verify that the record has been deleted:
The record is still there.
Expected behavior
The row should have been deleted like in the below example:
Let's insert a row:
Let's check that the record is there:
Let's remove it:
It's being deleted correctly:
The text was updated successfully, but these errors were encountered: