-
Notifications
You must be signed in to change notification settings - Fork 58
[JDBC] Fix mysql datasource can't partition #54
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
|
mysql -> |
|
The PR fixs the bug. -> The PR fixes the bug . |
Thanks for your correction |
| } | ||
| if (partitionsParameters.nonEmpty) { | ||
| specialProperties += ((s"${dsName}.${dbName}.${tbName}", partitionsParameters)) | ||
| } |
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.
Option(partitionsMap(dbName)(tbName)).foreach{ m =>
specialProperties += ((s"${dsName}.${dbName}.${tbName}", m))
}
| tablePartitionsMap.get.get(tbName).foreach { m => | ||
| specialProperties += ((s"${dsName}.${dbName}.${tbName}", m)) | ||
| } | ||
| } |
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.
Option(partitionsMap(dbName)).map{ tablePartitionsMap =>
Option(tablePartitionsMap(tbName)).foreach { m =>
specialProperties += ((s"${dsName}.${dbName}.${tbName}", m))
}
}
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.
Thanks for your advice, but the code can't pass.
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.
LGTM
This PR solves the problem that MySQL data source can't partition. The current code don't load partition information of MySQL into memory when `cache.level` is 1 . The PR fixes the bug.
This PR solves the problem that MySQL data source can't partition. The current code don't load partition information of MySQL into memory when `cache.level` is 1 . The PR fixes the bug.
|
Thanks! Merged to master and branch-0.6 |
What changes were proposed in this pull request?
This PR solves the problem that MySQL data source can't partition. The current code don't load partition information of MySQL into memory when
cache.levelis 1 . The PR fixes the bug.How was this patch tested?
No UT.