Skip to content

Cannot convert type UInt8 to Variant(String, UInt64). Parallel replicas variant type conversion #74366

Closed

Description

@fm4v

Repro with enabled parallel replicas:

set allow_experimental_variant_type=1;

create table test (v Variant(String, UInt64)) engine=MergeTree ORDER BY tuple();
insert into test values (42), ('Hello'), (NULL);
select * from test where v = 42::UInt64::Variant(String, UInt64);
02990_variant_where_cond:                                               [ FAIL ]
Reason: return code:  70
Received exception from server (version 25.1.1):
Code: 70. DB::Exception: Received from localhost:9000. DB::Exception: Cannot convert type UInt8 to Variant(String, UInt64). Conversion to Variant allowed only for types from this Variant: In scope SELECT __table1.v AS v FROM test_1sap69qb.test AS __table1 WHERE __table1.v = _CAST(42, 'Variant(String, UInt64)'). (CANNOT_CONVERT_TYPE)
(query: select * from test where v = 42::UInt64::Variant(String, UInt64);)

Affected tests:

02990_variant_where_cond.sql

Version 25.1.1.1921

Version info

Activity

  1. added
    bug
    comp-parallel-replicas
    on Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcomp-parallel-replicas

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions