Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LowCardinality support for required columns #104

Conversation

abdelhakimbendjabeur
Copy link
Contributor

@abdelhakimbendjabeur abdelhakimbendjabeur commented May 11, 2023

Summary

We have encountered a bug when inserting data into a table that LowCardinality columns.
I managed to narrow down the problem to Required LowCardinality columns.
The Insert fails and throws the following exception

java.lang.RuntimeException: 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 PR brings a fix and a test to cover the fix

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

@abdelhakimbendjabeur abdelhakimbendjabeur force-pushed the abdelhakimbendjabeur/fix-low-cardinality-support branch from 25a7833 to 28ede07 Compare May 11, 2023 16:12
@abdelhakimbendjabeur abdelhakimbendjabeur changed the title WIP: Fix LowCardinality support for required columns Fix LowCardinality support for required columns May 24, 2023
@abdelhakimbendjabeur
Copy link
Contributor Author

@mshustov @mzitnik @Paultagoras
Can you guys have a look at this one please 🙏

@mshustov mshustov requested a review from Paultagoras May 25, 2023 21:06
Copy link
Contributor

@Paultagoras Paultagoras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's curious that we had it hard-coded to true before

@Paultagoras Paultagoras merged commit 8d3ee72 into ClickHouse:main May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants