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

Enum Code + Test #2028

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Enum Code + Test #2028

wants to merge 3 commits into from

Conversation

Paultagoras
Copy link
Contributor

@Paultagoras Paultagoras commented Dec 17, 2024

Summary

Adds an alternate String flow that checks for Enum type and translates the underlying number to String

Checklist

Delete items not relevant to your PR:

@Paultagoras Paultagoras self-assigned this Dec 17, 2024
@Paultagoras Paultagoras requested a review from chernser December 17, 2024 17:26
Copy link

sonarcloud bot commented Dec 17, 2024

} else {
ClickHouseDataType dataType = schema.getColumnByName(colName).getDataType();
if (dataType == ClickHouseDataType.Enum8 || dataType == ClickHouseDataType.Enum16) {
ClickHouseEnum clickHouseEnum = schema.getColumnByName(colName).getEnumConstants();
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we always schema-aware?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. Otherwise we may not read data.
Schema may be from data stream header or user provided.

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.

[client-v2] Implement Enum support to return both String and int
3 participants