Skip to content

defaultValueOfArgumentType cannot be used in equations for LowCardinality columns #11808

@SaltTan

Description

@SaltTan

I have checked 19.16, 20.3 and 20.4

How to reproduce

SELECT
    toLowCardinality('') AS lc,
    toTypeName(lc)
WHERE lc = defaultValueOfArgumentType(lc)

┌─lc─┬─toTypeName(toLowCardinality(''))─┐
│    │ LowCardinality(String)           │
└────┴──────────────────────────────────┘


SELECT
    materialize(toLowCardinality('')) AS lc,
    toTypeName(lc)
WHERE lc = defaultValueOfArgumentType(lc)

Received exception from server (version 20.4.4):
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Expected single dictionary argument for function..

Metadata

Metadata

Labels

comp-datatype-wrapperType modifiers/wrappers (Nullable, LowCardinality, etc.).unexpected behaviourResult is unexpected, but not entirely wrong at the same time.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions