-
Notifications
You must be signed in to change notification settings - Fork 8.3k
18.16.1 Exception when querying empty arrays of LowCardinality(String) #3907
Copy link
Copy link
Closed
Description
There is an issue with empty arrays of LowCardinality(String). Disabling low_cardinality_allow_in_native_format fixes this issue.
A script to reproduce:
create table test.lc (names Array(LowCardinality(String))) engine=Memory;
insert into test.lc values ([]);
insert into test.lc select emptyArrayString();
select * from test.lc;
set low_cardinality_allow_in_native_format=0;
select * from test.lc;
This is how the script runs:
:) create table test.lc (names Array(LowCardinality(String))) engine=Memory;
CREATE TABLE test.lc
(
names Array(LowCardinality(String))
)
ENGINE = Memory
Ok.
0 rows in set. Elapsed: 0.003 sec.
:) insert into test.lc values ([]);
INSERT INTO test.lc VALUES
Received exception from server (version 18.16.1):
Code: 62. DB::Exception: Received from localhost:9000, ::1. DB::Exception: Empty query.
1 rows in set. Elapsed: 0.001 sec.
:) insert into test.lc select emptyArrayString();
INSERT INTO test.lc SELECT emptyArrayString()
Ok.
0 rows in set. Elapsed: 0.002 sec.
:) select * from test.lc;
SELECT *
FROM test.lc
┌─names─┐
│ [] │
└───────┘
↓ Progress: 1.00 rows, 17.00 B (934.01 rows/s., 15.88 KB/s.)
Exception on client:
Code: 62. DB::Exception: Empty query: while receiving packet from localhost:9000, ::1
Connecting to localhost:9000.
Connected to ClickHouse server version 18.16.1 revision 54412.
:) set low_cardinality_allow_in_native_format=0;
SET low_cardinality_allow_in_native_format = 0
Ok.
0 rows in set. Elapsed: 0.001 sec.
:) select * from test.lc
SELECT *
FROM test.lc
┌─names─┐
│ [] │
└───────┘
1 rows in set. Elapsed: 0.002 sec.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels