Skip to content

How to set the 'union_default_mode' attribute on the connection string? #701

@peterZhiFate

Description

@peterZhiFate

I execute this sql(SELECT c_ip4, c_ip6, NULL AS c_string, NULL AS c_fixstring FROM test.t_ip UNION SELECT NULL AS c_ip4, NULL AS c_ip6, c_string, c_fixstring FROM test.t_string) statement through the clickhouse jdbc driver, but the driver returns the following error.

error message: ClickHouse exception, code: 558, host: localhost, port: 8123; Code: 558, e.displayText() = DB::Exception: Expected ALL or DISTINCT in SelectWithUnion query, because setting (union_default_mode) is empty: While processing SELECT c_string, c_fixstring, NULL AS x, NULL AS y FROM test.t_string UNION SELECT NULL AS c_string, NULL AS c_fixstring, x, y FROM test.t_uuid (version 21.7.2.7 (official build))

How can I set this attribute value on the connection string?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions