You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 7, 2025. It is now read-only.
Revert "Combine ALTER TABLE into one (#1463)" (#1476)
This reverts commit 2506adb.
Combined alter table statements may not always work.
```
Error executing ingest statement: code: 48, message: For Replicated databases it's not allowed to execute ALTERs of different types (replicated and non replicated) in single query, query: ALTER TABLE "phone_home_logs" ADD COLUMN IF NOT EXISTS "request_id" Nullable(String), COMMENT COLUMN...
```
<!-- A note on testing your PR -->
<!-- Basic unit test run is executed against each commit in the PR.
If you want to run a full integration test suite, you can trigger it by
commenting
with '/run-integration-tests' or '/run-it' -->
`INSERT INTO "quesma_common_table" FORMAT JSONEachRow {"__quesma_index_name":"test_index","foo":"bar"}, {"__quesma_index_name":"test_index","foo":"baz"}`,
`INSERT INTO "quesma_common_table" FORMAT JSONEachRow {"__quesma_index_name":"test_index","foo":"bar"}, {"__quesma_index_name":"test_index","foo":"baz"}, {"__quesma_index_name":"test_index","baz":"qux","foo":"1"} `,
`INSERT INTO "quesma_common_table" FORMAT JSONEachRow {"__quesma_index_name":"test_index","foo":"bar"}, {"__quesma_index_name":"test_index","foo":"baz"}, {"__quesma_index_name":"test_index","baz":"qux","foo":"1"} `,
Copy file name to clipboardExpand all lines: platform/ingest/insert_test.go
+12-6Lines changed: 12 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -102,21 +102,27 @@ var configs = []*clickhouse.ChTableConfig{
102
102
varexpectedInserts= [][]string{
103
103
[]string{EscapeBrackets(`INSERT INTO "`+tableName+`" FORMAT JSONEachRow {"@timestamp":"2024-01-27T16:11:19.94Z","host_name":"hermes","message":"User password reset failed","service_name":"frontend","severity":"debug","source":"rhel"}`)},
104
104
[]string{
105
-
EscapeBrackets(`ALTER TABLE "`+tableName+`" ADD COLUMN IF NOT EXISTS "service_name" Nullable(String), COMMENT COLUMN "service_name" 'quesmaMetadataV1:fieldName=service.name'`),
105
+
EscapeBrackets(`ALTER TABLE "`+tableName+`" ADD COLUMN IF NOT EXISTS "service_name" Nullable(String)`),
EscapeBrackets(`INSERT INTO "`+tableName+`" FORMAT JSONEachRow {"@timestamp":"2024-01-27T16:11:19.94Z","host_name":"hermes","message":"User password reset failed","service_name":"frontend","severity":"debug","source":"rhel"}`),
112
115
},
113
116
[]string{
114
117
EscapeBrackets(`INSERT INTO "`+tableName+`" FORMAT JSONEachRow {"@timestamp":"2024-01-27T16:11:19.94Z","host_name":"hermes","message":"User password reset failed","random1":["debug"],"random2":"random-string","severity":"frontend"}`),
115
118
},
116
119
[]string{
117
-
EscapeBrackets(`ALTER TABLE "`+tableName+`" ADD COLUMN IF NOT EXISTS "random1" Array(String), COMMENT COLUMN "random1" 'quesmaMetadataV1:fieldName=random1'`),
118
-
EscapeBrackets(`ALTER TABLE "`+tableName+`" ADD COLUMN IF NOT EXISTS "random2" Nullable(String), COMMENT COLUMN "random2" 'quesmaMetadataV1:fieldName=random2'`),
119
-
EscapeBrackets(`ALTER TABLE "`+tableName+`" ADD COLUMN IF NOT EXISTS "severity" Nullable(String), COMMENT COLUMN "severity" 'quesmaMetadataV1:fieldName=severity'`),
120
+
EscapeBrackets(`ALTER TABLE "`+tableName+`" ADD COLUMN IF NOT EXISTS "random1" Array(String)`),
EscapeBrackets(`INSERT INTO "`+tableName+`" FORMAT JSONEachRow {"@timestamp":"2024-01-27T16:11:19.94Z","host_name":"hermes","message":"User password reset failed","random1":["debug"],"random2":"random-string","severity":"frontend"}`),
0 commit comments