Skip to content

ClickHouse SQL query doesn't return results when it contains ^ character #40407

@QazCetelic

Description

@QazCetelic

Description

select toJSONString(data.^header_index) from database.analyzed limit 1;

This returns nothing aside from the execution statistics.

Image

DBeaver Version

Community Edition Version 25.3.4.202602011558 (installed through Flatpak)

Operating System

Linux OpenSUSE Tumbleweed

Database and driver

Database: ClickHouse (ver. 25.11.3.54)
Driver: com.clickhouse.clickhouse-jdbc version 0.9.5

Steps to reproduce

  1. Try to access field of subobject with ^

Additional context

The same query does work in DataGrip
Image

ClickHouse documentation about ^ operator

The JSON type supports reading nested objects as sub-columns with type JSON using the special syntax json.^some.path:

CREATE TABLE test (json JSON) ENGINE = Memory;
INSERT INTO test VALUES ('{"a" : {"b" : {"c" : 42, "g" : 42.42}}, "c" : [1, 2, 3], "d" : {"e" : {"f" : {"g" : "Hello, World", "h" : [1, 2, 3]}}}}'), ('{"f" : "Hello, World!", "d" : {"e" : {"f" : {"h" : [4, 5, 6]}}}}'), ('{"a" : {"b" : {"c" : 43, "e" : 10, "g" : 43.43}}, "c" : [4, 5, 6]}');
SELECT json FROM test;

Link

I can also reproduce it using version 0.9.6

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions