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
Add HANA connector #21034
Add HANA connector #21034
Conversation
583e31f
to
eaff83b
Compare
Codenotify: Notifying subscribers in CODENOTIFY files for diff 580f2e3...13ebc4f.
|
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.
This looks great! I have a few suggestions and revisions in comments that I hope you will consider.
875bc80
to
9701c15
Compare
Thanks @steveburnett. I just updated the docs according to your comments. |
4f7f444
to
7cf4582
Compare
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! (docs)
Pulled and built a new local build of the docs, everything looks great here. Thanks for your work!
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.
Thank you so much for this contribution, @JiamingMai! It's always great to have new connectors, especially when there is community interest. I just had a few initial observations below, mostly NITs 🙂
I think overall we could also benefit from adding some additional tests, which is always useful in clarifying the supported features of a given connector
presto-hana/src/main/java/com/facebook/presto/plugin/hana/HanaClient.java
Outdated
Show resolved
Hide resolved
The HANA connector allows querying and creating tables in an | ||
external HANA database. This can be used to join data between | ||
different systems like HANA and Hive, or between two different | ||
HANA instances. |
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'm a bit confused about the support for creating tables. It's mentioned here that creating tables is supported, but then it says in the limitations section below that it isn't. We should probably clarify that and then add some tests as well if applicable
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 @kiersten-stokes. I just removed the redundant codes according to your comments. I have tested and clarified that CREATE TABLE
and DROP TABLE
statements are supported. But it is difficult to add the tests for similar reasons as SQL Server. It is very heavy to create an embedded HANA server. The only way to create an embedded HANA server is to build with docker image SAP HANA, express edition. Unfortunately, it is no longer maintained (it takes a large amount of RAM to create even if it still works).
6a2427b
to
37fd655
Compare
@JiamingMai thanks for adding this connector. I am a bit concerned about the lack of automated tests. Do you commit to supporting this connector, including triaging Github issues and answering questions about the connector? |
Thanks @tdcmeehan. I am committed to supporting this connector and would like to take responsibility for triaging GitHub issues and answering questions about this connector. It is difficult to add the tests for HANA connector as the official does not provide a lightweight embedded HANA server. |
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, let me ask Shengxuan to take a look also.
@Override | ||
public void configure(Binder binder) | ||
{ | ||
binder.bind(JdbcClient.class).to(HanaClient.class).in(Scopes.SINGLETON); |
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.
It might be better to static import Scopes.SINGLETON
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 @beinan. Updated. I used static import instead.
{ | ||
// Abort connection before closing. Without this, the Hana driver | ||
// attempts to drain the connection by reading all the results. | ||
connection.abort(directExecutor()); |
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.
It would be better to use try catch here
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.
Thank you Shengxuan for the review! @JiamingMai do you mind to take a look?
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.
Updated. Thanks @liushengxuan. I used try catch here.
e726cd8
to
b597e0c
Compare
Hi @JiamingMai, looks like the maven checks are still failing, do you mind taking a look? Thanks! |
670f15b
to
476cb39
Compare
I just updated the |
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
@JiamingMai could you help to refine a little bit on your commit message and release notes. here is the doc: https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines |
476cb39
to
13ebc4f
Compare
Thanks @beinan. I just updated the release notes according to the guidelines. |
Description
This PR introduces new JDBC connector for HANA .
Motivation and Context
Some enterprises requires new connector to integrate with HANA database (there is also a related issue before: related discussion).
Impact
No impact.
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.