Skip to content
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

Failure to create materialized view on first load #445

Closed
Homulvas opened this issue Jan 29, 2024 · 3 comments · Fixed by #446
Closed

Failure to create materialized view on first load #445

Homulvas opened this issue Jan 29, 2024 · 3 comments · Fixed by #446

Comments

@Homulvas
Copy link

I'm attempting to run qryn on k8s with the provided helm template (v0.1.1). On start the table creation fails midway:

> qryn@3.1.1 start
> node qryn.mjs

{"level":30,"time":1706551098613,"pid":22,"hostname":"qryn-qryn-helm-fff-p56rg","name":"qryn","msg":"Initializing DB... qryn"}
{"level":30,"time":1706551096804,"pid":22,"hostname":"qryn-qryn-helm-fff-p56rg","name":"qryn","msg":"xxh ready"}
{"level":30,"time":1706551099003,"pid":22,"hostname":"qryn-qryn-helm-fff-p56rg","name":"qryn","msg":"xxh ready"}
{"level":50,"time":1706551100701,"pid":22,"hostname":"qryn-qryn-helm-fff-p56rg","name":"qryn","msg":"rawRequest error: CREATE MATERIALIZED VIEW IF NOT EXISTS profiles_series_gin_mv ON CLUSTER `loggingtest` TO profiles_series_gin AS\n    SELECT \n      date,\n      kv.1 as key,\n      kv.2 as val,\n      type_id,\n      sample_types_units,\n      service_name,\n      fingerprint,\n    FROM profiles_series ARRAY JOIN tags as kv"}
{"level":50,"time":1706551100701,"pid":22,"hostname":"qryn-qryn-helm-fff-p56rg","name":"qryn","msg":"Code: 62. DB::Exception: Syntax error: failed at position 265 ('profiles_series') (line 10, col 10): profiles_series ARRAY JOIN tags as kv. Expected one of: token, Dot, OR, AND, BETWEEN, NOT BETWEEN, LIKE, ILIKE, NOT LIKE, NOT ILIKE, REGEXP, IN, NOT IN, GLOBAL IN, GLOBAL NOT IN, MOD, DIV, IS NULL, IS NOT NULL, alias, AS, Comma, FROM, PREWHERE, WHERE, GROUP BY, WITH, HAVING, WINDOW, ORDER BY, LIMIT, OFFSET, SETTINGS, UNION, EXCEPT, INTERSECT, COMMENT, INTO OUTFILE, FORMAT, end of query. (SYNTAX_ERROR) (version 23.3.11.5 (official build))\n"}
{"level":50,"time":1706551100702,"pid":22,"hostname":"qryn-qryn-helm-fff-p56rg","name":"qryn","err":"Error: Request failed with status code 400\nResponse: [400] undefined\nError: Request failed with status code 400\n    at createError (/app/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/app/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/app/node_modules/axios/lib/adapters/http.js:269:11)\n    at IncomingMessage.emit (node:events:530:35)\n    at endReadableNT (node:internal/streams/readable:1696:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)","msg":"Error starting qryn"}

It appears that the materialized view can be created if the trailing comma after fingerprint is removed. In case this is related to the ClickHouse version I'm currently running 23.3.11.5.

@akvlad
Copy link
Collaborator

akvlad commented Jan 29, 2024

Thanks a lot for the information.
Apparently some extra commas have been unintentionally misplaced. Sorry.
Will be fixed in the very next release.

@akvlad akvlad mentioned this issue Jan 29, 2024
@akvlad akvlad reopened this Jan 29, 2024
@akvlad
Copy link
Collaborator

akvlad commented Jan 29, 2024

should be fixed in 3.2.0

@Homulvas
Copy link
Author

Updated and can confirm that it is working as expected now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants