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

JDBC sources: Fix unexcepcted long Integer value failure #3846

Merged
merged 4 commits into from
Jun 4, 2021

Conversation

DoNotPanicUA
Copy link
Contributor

@DoNotPanicUA DoNotPanicUA commented Jun 3, 2021

Issue: #3840

What

Fix an error when JDBC source produces Integer value bigger than max Java Integer value.

How

Implement handler which tries to convert into Integer first. My assumption is that at most cases the value will be in the range.
If it fails, the handler tries to convert into the Long type. In all other negative cases it will replace value by null.

Pre-merge Checklist

  • Run integration tests
  • Publish Docker images

Recommended reading order

  1. JdbcUtils.java

…o cover the case with too large value (possible for some sources)
@DoNotPanicUA DoNotPanicUA marked this pull request as ready for review June 3, 2021 18:49
Copy link
Contributor

@sherifnada sherifnada left a comment

Choose a reason for hiding this comment

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

LGTM -- please publish and merge. Also, can you add this to the data type tests?

BTW see the definition-of-done checklist here to help clarify what next steps would be: #3864

@sherifnada
Copy link
Contributor

@DoNotPanicUA also can you update the PR title to match best practices for PR titles?

@DoNotPanicUA DoNotPanicUA changed the title 3840 fix mysql JDBC sources: Fix unexcepcted long Integer value failure Jun 4, 2021
@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=source-mysql

🕑 source-mysql https://github.com/airbytehq/airbyte/actions/runs/905415719
✅ source-mysql https://github.com/airbytehq/airbyte/actions/runs/905415719

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=source-jdbc

🕑 source-jdbc https://github.com/airbytehq/airbyte/actions/runs/905437299
✅ source-jdbc https://github.com/airbytehq/airbyte/actions/runs/905437299

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=source-mssql

🕑 source-mssql https://github.com/airbytehq/airbyte/actions/runs/905438603
✅ source-mssql https://github.com/airbytehq/airbyte/actions/runs/905438603

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=source-oracle

🕑 source-oracle https://github.com/airbytehq/airbyte/actions/runs/905439792
✅ source-oracle https://github.com/airbytehq/airbyte/actions/runs/905439792

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=source-postgres

🕑 source-postgres https://github.com/airbytehq/airbyte/actions/runs/905440971
✅ source-postgres https://github.com/airbytehq/airbyte/actions/runs/905440971

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=source-redshift

🕑 source-redshift https://github.com/airbytehq/airbyte/actions/runs/905442071
✅ source-redshift https://github.com/airbytehq/airbyte/actions/runs/905442071

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=source-clickhouse

🕑 source-clickhouse https://github.com/airbytehq/airbyte/actions/runs/905443231
✅ source-clickhouse https://github.com/airbytehq/airbyte/actions/runs/905443231

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=destination-snowflake

🕑 destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/905488975
✅ destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/905488975

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=destination-jdbc

🕑 destination-jdbc https://github.com/airbytehq/airbyte/actions/runs/905491481
✅ destination-jdbc https://github.com/airbytehq/airbyte/actions/runs/905491481

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=destination-mysql

🕑 destination-mysql https://github.com/airbytehq/airbyte/actions/runs/905493539
✅ destination-mysql https://github.com/airbytehq/airbyte/actions/runs/905493539

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=destination-mssql

🕑 destination-mssql https://github.com/airbytehq/airbyte/actions/runs/905494132
✅ destination-mssql https://github.com/airbytehq/airbyte/actions/runs/905494132

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=destination-postgres

🕑 destination-postgres https://github.com/airbytehq/airbyte/actions/runs/905495886
✅ destination-postgres https://github.com/airbytehq/airbyte/actions/runs/905495886

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=destination-redshift

🕑 destination-redshift https://github.com/airbytehq/airbyte/actions/runs/905497914
✅ destination-redshift https://github.com/airbytehq/airbyte/actions/runs/905497914

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/test connector=destination-snowflake

🕑 destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/905498232
✅ destination-snowflake https://github.com/airbytehq/airbyte/actions/runs/905498232

@DoNotPanicUA
Copy link
Contributor Author

LGTM -- please publish and merge. Also, can you add this to the data type tests?

This case is added to the PR with tests. Corresponding commit.

@DoNotPanicUA
Copy link
Contributor Author

DoNotPanicUA commented Jun 4, 2021

/publish connector=connectors/source-mysql

🕑 connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/905800611
✅ connectors/source-mysql https://github.com/airbytehq/airbyte/actions/runs/905800611

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.

Source MySQL: unsigned numeric values larger than signed integer size break connector
5 participants