Skip to content

20.4 + dictGet + group by = Function dictGet... takes 3 or 4 arguments. #11469

@filimonov

Description

@filimonov

Regression (20.3 and earlier work properly).

dictGetString works properly too.

test case:

CREATE TABLE countries_table
(
  id UInt64,
  code String,
  country String
)
ENGINE = MergeTree()
ORDER BY id;

INSERT INTO countries_table VALUES (0,'AF','Afghanistan'), (1,'AL','Albania'), (2,'DZ','Algeria'), (3,'AS','American Samoa');

CREATE DICTIONARY countryId
(
  id UInt64 DEFAULT 0,
  code String DEFAULT '',
  country String DEFAULT ''
)
PRIMARY KEY id
SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'countries_table' PASSWORD '' DB 'default'))
LIFETIME(MIN 1 MAX 10)
LAYOUT(FLAT());

-- that works
SELECT dictGetString('default.countryId', 'country', toUInt64(number)) AS country FROM numbers(2) GROUP BY country;

-- that does not work on 20.4
SELECT dictGet('default.countryId', 'country', toUInt64(number)) AS country FROM numbers(2) GROUP BY country;

-- that works
SELECT dictGet('default.countryId', 'country', toUInt64(number)) AS country FROM numbers(2);

Metadata

Metadata

Assignees

Labels

bugConfirmed user-visible misbehaviour in official releasecomp-dictionaryDictionaries (in-memory key-value, periodically refreshed from sources).major

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions