MyScaleDB icon indicating copy to clipboard operation
MyScaleDB copied to clipboard

Prevent process crashes due to invalid SQL queries

Open fastio opened this issue 9 months ago • 0 comments

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

<Fatal> : 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 ] <Fatal> BaseDaemon: ######################################## [VM-0-56-ubuntu] 2025.04.01 10:44:36.805130 [ 1312542 ] <Fatal> 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/

fastio avatar Apr 01 '25 03:04 fastio