Prevent process crashes due to invalid SQL queries #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix error code when received wrong query column type.
WITH (
SELECT arrayMap(x -> CAST(x, 'Float64'), data)
FROM default.myscale_categorical_search
LIMIT 1
) AS target_test_data
SELECT
id,
date,
label,
distance(data, []) AS dist
FROM default.myscale_categorical_search
WHERE (toYear(date) >= 2000) AND (label = 'animal')
ORDER BY dist ASC
LIMIT 10
: Logical error: 'Wrong query column type, expect Float32 or Float64 inside Array() in distance function'.
[VM-0-56-ubuntu] 2025.04.01 10:44:36.804580 [ 1312542 ] BaseDaemon: ########################################
[VM-0-56-ubuntu] 2025.04.01 10:44:36.805130 [ 1312542 ] BaseDaemon: (version 23.3.2.1, build id: 39E7292821ED39D322045EE46838C1BB7723AA09) (from thread 1303150) (query_id: e9157684-1c3b-4e16-a753-78d7e6eb1411) (query: WITH
(
SELECT arrayMap(x -> CAST(x AS Float64), data)
FROM default.myscale_categorical_search
LIMIT 1
) AS target_test_data
SELECT id, date, label,
distance(data, []) AS dist
FROM default.myscale_categorical_search WHERE toYear(date) >= 2000 AND label = 'animal'
ORDER BY dist LIMIT 10;) Received signal Aborted (6)
Documentation entry for user-facing changes