Skip to content

Conversation

@shunping
Copy link
Collaborator

@shunping shunping commented Sep 4, 2025

Managed JDBCIO (Part 2) - MySQL

Similar to #36034

@shunping shunping marked this pull request as ready for review September 4, 2025 11:55
@shunping shunping requested a review from chamikaramj September 4, 2025 11:56
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2025

Assigning reviewers:

R: @damccorm for label python.
R: @chamikaramj for label java.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@shunping shunping self-assigned this Sep 10, 2025
@shunping shunping requested a review from ahmedabu98 September 10, 2025 14:31
Copy link
Contributor

@ahmedabu98 ahmedabu98 left a 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

Comment on lines 58 to 62
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));
}
Copy link
Contributor

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

Copy link
Collaborator Author

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.

Comment on lines 69 to 71
LOG.warn(
"The fetchSize option is ignored. It is required to set useCursorFetch=true"
+ " in the JDBC URL when using fetchSize for MySQL");
Copy link
Contributor

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@codecov
Copy link

codecov bot commented Sep 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.91%. Comparing base (9651c64) to head (d230755).
⚠️ Report is 49 commits behind head on master.

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            
Flag Coverage Δ
python 80.91% <100.00%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shunping shunping merged commit f86452f into apache:master Sep 17, 2025
125 of 129 checks passed
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.

2 participants