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

[improve][io]: Add validation for JDBC sink not supporting primitive schema #22376

Merged
merged 2 commits into from
Mar 29, 2024

Conversation

shibd
Copy link
Member

@shibd shibd commented Mar 28, 2024

Motivation

Currently implemented for JdbcAutoSchemaSink connector, It utilizes GenericRecord.getField to find fields with the same table column names.

recordValueGetter = (key) -> ((GenericRecord) record).getField(key);

However, the return value of the primitive type schema is always null. This results in null data being inserted into the table, thereby causing errors.

Modifications

  • For the primitive type of schema, throw a clear exception to inform the user that it is not supported.

Verifying this change

  • Add testNotSupportPrimitiveSchema to cover it.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@Technoboy- Technoboy- added this to the 3.3.0 milestone Mar 28, 2024
@shibd shibd merged commit a3bf4e8 into apache:master Mar 29, 2024
49 of 50 checks passed
Technoboy- pushed a commit to Technoboy-/pulsar that referenced this pull request Apr 1, 2024
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 15, 2024
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 17, 2024
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 17, 2024
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 19, 2024
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants