Skip to content
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

18.10.3. Something is broken with String columns in tables with engine=Dictionary #2913

Closed
SaltTan opened this issue Aug 21, 2018 · 1 comment
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release

Comments

@SaltTan
Copy link
Contributor

SaltTan commented Aug 21, 2018

  1. Join with a memory table does not work when selecting a string column
$ clickhouse-client
ClickHouse client version 18.10.3.
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 18.10.3 revision 54405.

:) show create table dict_table

SHOW CREATE TABLE dict_table

┌─statement────────────────────────────────────────────────────────────────────────────────────┐
│ CREATE TABLE test.dict_table ( key UInt64,  source String) ENGINE = Dictionary(dim_netspeed) │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
:) show create table test.mem_table

SHOW CREATE TABLE test.mem_table

┌─statement─────────────────────────────────────────────────┐
│ CREATE TABLE test.mem_table ( key UInt64) ENGINE = Memory │
└───────────────────────────────────────────────────────────┘

:) SELECT key, source FROM test.dict_table  ALL INNER JOIN test.mem_table USING (key)

SELECT
    key,
    source
FROM test.dict_table
ALL INNER JOIN test.mem_table USING (key)

Received exception from server (version 18.10.3):
Code: 9. DB::Exception: Received from localhost:9000, ::1. DB::Exception: Size of offsets doesn't match size of column..

:) SELECT key FROM test.dict_table  ALL INNER JOIN test.mem_table USING (key)

SELECT key
FROM test.dict_table
ALL INNER JOIN test.mem_table USING (key)

Ok.
  1. Select of a string column from a dictionary table does not work (clickhouse-client only, works fine through HTTP)
:) SELECT key, source FROM test.dict_table

SELECT
    key,
    source
FROM test.dict_table


Exception on client:
Code: 89. DB::Exception: Unknown compression method: 105: while receiving packet from localhost:9000, ::1

:) SELECT source FROM test.dict_table

SELECT source
FROM test.dict_table

┌─source───┐
│ NULL     │
│ contype  │
│ contype  │
│ contype  │
│ contype  │
│ contype  │
│ contype  │
│ lookup   │
│ lookup   │
│ lookup   │
│ lookup   │
│ lookup   │
│ lookup   │
│ netspeed │
│ netspeed │
│ netspeed │
│ netspeed │
│ netspeed │
│ netspeed │
└──────────┘
┌─source───┐
│ NULL     │
│ contype  │
│ contype  │
│ contype  │
│ contype  │
│ contype  │
│ contype  │
│ lookup   │
│ lookup   │
│ lookup   │
│ lookup   │
│ lookup   │
│ lookup   │
│ netspeed │
│ netspeed │
│ netspeed │
│ netspeed │
│ netspeed │
│ netspeed │
└──────────┘

38 rows in set. Elapsed: 0.002 sec.
  1. Distinct on a string column does not work (clickhouse-client only, works fine through HTTP)
:) select distinct source from test.dict_table

SELECT DISTINCT source
FROM test.dict_table

┌─source───┐
│ NULL     │
│ contype  │
│ contype  │
│ contype  │
│ contype  │
│ contype  │
│ contype  │
│ lookup   │
│ lookup   │
│ lookup   │
│ lookup   │
│ lookup   │
│ lookup   │
│ netspeed │
│ netspeed │
│ netspeed │
│ netspeed │
│ netspeed │
│ netspeed │
└──────────┘
┌─source───┐
│ NULL     │
│ contype  │
│ lookup   │
│ netspeed │
└──────────┘

23 rows in set. Elapsed: 0.002 sec.

$ wget -O- -q 'http://localhost:8123/?query=select distinct source from test.dict_table'
NULL
contype
lookup
netspeed
@alexey-milovidov alexey-milovidov added the bug Confirmed user-visible misbehaviour in official release label Aug 22, 2018
@alexey-milovidov alexey-milovidov self-assigned this Aug 22, 2018
alexey-milovidov added a commit that referenced this issue Aug 24, 2018
alexey-milovidov added a commit that referenced this issue Aug 24, 2018
alexey-milovidov added a commit that referenced this issue Aug 24, 2018
alexey-milovidov added a commit that referenced this issue Aug 24, 2018
alexey-milovidov added a commit that referenced this issue Aug 24, 2018
@alexey-milovidov
Copy link
Member

Fixed in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release
Projects
None yet
Development

No branches or pull requests

3 participants