Skip to content

Prevent process crashes due to invalid SQL queries #49

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fastio
Copy link

@fastio fastio commented Apr 1, 2025

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

  • Documentation is written (mandatory for new features)

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

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 this pull request may close these issues.

1 participant