Skip to content

DBZ-3124 Add ENUM column type support for Vitess 9.0.0#20

Merged
keweishang merged 2 commits into
debezium:masterfrom
keweishang:DBZ-3124-add-enum-support
Feb 19, 2021
Merged

DBZ-3124 Add ENUM column type support for Vitess 9.0.0#20
keweishang merged 2 commits into
debezium:masterfrom
keweishang:DBZ-3124-add-enum-support

Conversation

@keweishang
Copy link
Copy Markdown
Member

@keweishang keweishang commented Feb 18, 2021

Comment thread pom.xml
Copy link
Copy Markdown
Member

@gunnarmorling gunnarmorling left a comment

Choose a reason for hiding this comment

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

LGTM; some small suggestions inline.

Comment thread src/main/java/io/debezium/connector/vitess/VitessType.java Outdated
Comment thread src/main/java/io/debezium/connector/vitess/VitessType.java Outdated
Comment thread src/main/java/io/debezium/connector/vitess/VitessType.java Outdated
Comment thread src/main/java/io/debezium/connector/vitess/VitessValueConverter.java Outdated
Comment thread src/main/java/io/debezium/connector/vitess/VitessValueConverter.java Outdated
@gunnarmorling
Copy link
Copy Markdown
Member

@ani-sha, just seeing that the JIRA-key-less commit message didn't trigger a build failure here. Could you look into setting up the commit message job for this (and potentially other) repo? Thx!

@gunnarmorling
Copy link
Copy Markdown
Member

@keweishang, sorry, just noticed one more thing is missing for the docs update in core: the data type table still lists enums as unsupported.

@keweishang
Copy link
Copy Markdown
Member Author

just noticed one more thing is missing for the docs update in core: the data type table still lists enums as unsupported.

@gunnarmorling, sorry I missed that. I just created a PR for updating the documentation - data type table lists enums as supported:
debezium/debezium#2149

@keweishang
Copy link
Copy Markdown
Member Author

@ani-sha I'll push an amend-commit (a.k.a. git commit --amend) to modify the commit message, so that every commit would have the issue key. But here's the screenshot before I pushed my amend-commit:
image

@keweishang keweishang force-pushed the DBZ-3124-add-enum-support branch 2 times, most recently from 4569ecc to 0b3e58d Compare February 19, 2021 14:06
@keweishang keweishang force-pushed the DBZ-3124-add-enum-support branch from 0b3e58d to 9e9f48e Compare February 19, 2021 14:06
Copy link
Copy Markdown
Member

@gunnarmorling gunnarmorling left a comment

Choose a reason for hiding this comment

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

LGTM now, thx! Can you merge yourself and resolve the issue once CI has passed? Thanks a lot!

@keweishang
Copy link
Copy Markdown
Member Author

Sure, I'll merge the PR and resolve the issue once CI has passed.

@keweishang keweishang merged commit 8980105 into debezium:master Feb 19, 2021
maxenglander added a commit to planetscale/debezium-connector-planetscale that referenced this pull request Oct 16, 2024
Enable support for enums during vstream copy phase.

There are two reasons that the connector does not handle `enum` for PSDB branches.

 1. The upstream debezium-connector-vitess simply does not support
    `enum` during the VStream copy phase. It tries to cast the row value
    to an integer, but the value is a string. It seems support for
    `enum` landed in 2021
    debezium#20, and
    support for snapshots (VStream Copy) landed in 2022
    debezium#112,
    without taking the former into account. This is easily fixed by
    finding finding the index of the string
    value in the list of values obtained from `column_type` during the
    schema discovery phase at the beginning of the VStream.
 2. However, this isn't working on some PSDB branches which don't have
    the fix vitessio/vitess#13045 for this bug
    vitessio/vitess#12981. Fixable by
    backporting the bugfix or upgrading those branches.

Signed-off-by: Max Englander <max@planetscale.com>
maxenglander added a commit to planetscale/debezium-connector-planetscale that referenced this pull request Oct 16, 2024
Enable support for enums during vstream copy phase.

There are two reasons that the connector does not handle `enum` for PSDB branches.

 1. The upstream debezium-connector-vitess simply does not support
    `enum` during the VStream copy phase. It tries to cast the row value
    to an integer, but the value is a string. It seems support for
    `enum` landed in 2021
    debezium#20, and
    support for snapshots (VStream Copy) landed in 2022
    debezium#112,
    without taking the former into account. This is easily fixed by
    finding finding the index of the string
    value in the list of values obtained from `column_type` during the
    schema discovery phase at the beginning of the VStream.
 2. However, this isn't working on some PSDB branches which don't have
    the fix vitessio/vitess#13045 for this bug
    vitessio/vitess#12981. Fixable by
    backporting the bugfix or upgrading those branches.

Signed-off-by: Max Englander <max@planetscale.com>
maxenglander added a commit to planetscale/debezium-connector-planetscale that referenced this pull request Oct 18, 2024
Enable support for enums during vstream copy phase.

There are two reasons that the connector does not handle `enum` for PSDB branches.

 1. The upstream debezium-connector-vitess simply does not support
    `enum` during the VStream copy phase. It tries to cast the row value
    to an integer, but the value is a string. It seems support for
    `enum` landed in 2021
    debezium#20, and
    support for snapshots (VStream Copy) landed in 2022
    debezium#112,
    without taking the former into account. This is easily fixed by
    finding finding the index of the string
    value in the list of values obtained from `column_type` during the
    schema discovery phase at the beginning of the VStream.
 2. However, this isn't working on some PSDB branches which don't have
    the fix vitessio/vitess#13045 for this bug
    vitessio/vitess#12981. Fixable by
    backporting the bugfix or upgrading those branches.

Signed-off-by: Max Englander <max@planetscale.com>
maxenglander added a commit to planetscale/debezium-connector-planetscale that referenced this pull request Oct 18, 2024
Enable support for enums during vstream copy phase.

There are two reasons that the connector does not handle `enum` for PSDB branches.

 1. The upstream debezium-connector-vitess simply does not support
    `enum` during the VStream copy phase. It tries to cast the row value
    to an integer, but the value is a string. It seems support for
    `enum` landed in 2021
    debezium#20, and
    support for snapshots (VStream Copy) landed in 2022
    debezium#112,
    without taking the former into account. This is easily fixed by
    finding finding the index of the string
    value in the list of values obtained from `column_type` during the
    schema discovery phase at the beginning of the VStream.
 2. However, this isn't working on some PSDB branches which don't have
    the fix vitessio/vitess#13045 for this bug
    vitessio/vitess#12981. Fixable by
    backporting the bugfix or upgrading those branches.

Signed-off-by: Max Englander <max@planetscale.com>
maxenglander added a commit to planetscale/debezium-connector-planetscale that referenced this pull request Oct 18, 2024
Enable support for enums during vstream copy phase.

There are two reasons that the connector does not handle `enum` for PSDB branches.

 1. The upstream debezium-connector-vitess simply does not support
    `enum` during the VStream copy phase. It tries to cast the row value
    to an integer, but the value is a string. It seems support for
    `enum` landed in 2021
    debezium#20, and
    support for snapshots (VStream Copy) landed in 2022
    debezium#112,
    without taking the former into account. This is easily fixed by
    finding finding the index of the string
    value in the list of values obtained from `column_type` during the
    schema discovery phase at the beginning of the VStream.
 2. However, this isn't working on some PSDB branches which don't have
    the fix vitessio/vitess#13045 for this bug
    vitessio/vitess#12981. Fixable by
    backporting the bugfix or upgrading those branches.

Signed-off-by: Max Englander <max@planetscale.com>
maxenglander added a commit to planetscale/debezium-connector-planetscale that referenced this pull request Oct 21, 2024
Enable support for enums during vstream copy phase.

There are two reasons that the connector does not handle `enum` for PSDB branches.

 1. The upstream debezium-connector-vitess simply does not support
    `enum` during the VStream copy phase. It tries to cast the row value
    to an integer, but the value is a string. It seems support for
    `enum` landed in 2021
    debezium#20, and
    support for snapshots (VStream Copy) landed in 2022
    debezium#112,
    without taking the former into account. This is easily fixed by
    finding finding the index of the string
    value in the list of values obtained from `column_type` during the
    schema discovery phase at the beginning of the VStream.
 2. However, this isn't working on some PSDB branches which don't have
    the fix vitessio/vitess#13045 for this bug
    vitessio/vitess#12981. Fixable by
    backporting the bugfix or upgrading those branches.

Signed-off-by: Max Englander <max@planetscale.com>
maxenglander added a commit to planetscale/debezium-connector-planetscale that referenced this pull request Oct 23, 2024
Enable support for enums during vstream copy phase.

There are two reasons that the connector does not handle `enum` for PSDB branches.

 1. The upstream debezium-connector-vitess simply does not support
    `enum` during the VStream copy phase. It tries to cast the row value
    to an integer, but the value is a string. It seems support for
    `enum` landed in 2021
    debezium#20, and
    support for snapshots (VStream Copy) landed in 2022
    debezium#112,
    without taking the former into account. This is easily fixed by
    finding finding the index of the string
    value in the list of values obtained from `column_type` during the
    schema discovery phase at the beginning of the VStream.
 2. However, this isn't working on some PSDB branches which don't have
    the fix vitessio/vitess#13045 for this bug
    vitessio/vitess#12981. Fixable by
    backporting the bugfix or upgrading those branches.

Signed-off-by: Max Englander <max@planetscale.com>
maxenglander added a commit to planetscale/debezium-connector-planetscale that referenced this pull request Oct 25, 2024
Enable support for enums during vstream copy phase.

There are two reasons that the connector does not handle `enum` for PSDB branches.

 1. The upstream debezium-connector-vitess simply does not support
    `enum` during the VStream copy phase. It tries to cast the row value
    to an integer, but the value is a string. It seems support for
    `enum` landed in 2021
    debezium#20, and
    support for snapshots (VStream Copy) landed in 2022
    debezium#112,
    without taking the former into account. This is easily fixed by
    finding finding the index of the string
    value in the list of values obtained from `column_type` during the
    schema discovery phase at the beginning of the VStream.
 2. However, this isn't working on some PSDB branches which don't have
    the fix vitessio/vitess#13045 for this bug
    vitessio/vitess#12981. Fixable by
    backporting the bugfix or upgrading those branches.

Signed-off-by: Max Englander <max@planetscale.com>
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.

2 participants