-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Support managed jdbc io (MySQL) #36045
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
Conversation
|
Assigning reviewers: R: @damccorm for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
d15e5b8 to
8b05bf6
Compare
8b05bf6 to
3121b02
Compare
ahmedabu98
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, just left a few comments
| String jdbcType = configuration.getJdbcType(); | ||
| if (jdbcType != null && !jdbcType.isEmpty() && !jdbcType.equals(jdbcType())) { | ||
| throw new IllegalArgumentException( | ||
| String.format("Wrong JDBC type. Expected '%s' but got '%s'", jdbcType(), jdbcType)); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we should just be ignoring the jdbcType parameter. It seems irrelevant if users specifically choose MySQL using SchemaTransform/Managed API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed the exception to a warning message and overwritten the wrong type with the correct one.
| LOG.warn( | ||
| "The fetchSize option is ignored. It is required to set useCursorFetch=true" | ||
| + " in the JDBC URL when using fetchSize for MySQL"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider failing instead of just logging a warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #36045 +/- ##
==========================================
Coverage 54.91% 54.91%
Complexity 1617 1617
==========================================
Files 1057 1057
Lines 164001 164293 +292
Branches 1165 1165
==========================================
+ Hits 90061 90226 +165
- Misses 71787 71914 +127
Partials 2153 2153
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Managed JDBCIO (Part 2) - MySQL
Similar to #36034