Skip to content

Sink crashes when inserting required LowCardinality columns  #105

Closed
@abdelhakimbendjabeur

Description

@abdelhakimbendjabeur

Describe the bug

When a table has a required LowCardinality column, the sink fails because of some byte mismatch (see below for log message).
It works fine if the column is nullable.

I have started working on it and managed to reproduce the error using a unit test.

If anybody has an idea on how to quickly fix, it'd be great. In the meantime, I'll see what I can do

Steps to reproduce

Check the Unit Test in this PR #104

Expected behaviour

Data should be inserted correctly

Error log

Caused by: java.util.concurrent.ExecutionException: com.clickhouse.client.ClickHouseException: Code: 33. DB::Exception: Cannot read all data. Bytes read: 66. Bytes expected: 98.: (at row 7)

👇 This is the line that throws the exception

ClickHouseResponse response = future.get()

Configuration

Environment

  • Kafka-Connect version:
  • Kafka Connect configuration:
  • Kafka version:
  • Kafka environment:
  • OS:

ClickHouse server

  • ClickHouse Server version:
  • ClickHouse Server non-default settings, if any:
  • CREATE TABLE statements for tables involved:
  • Sample data for all these tables, use clickhouse-obfuscator if necessary

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions