-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BEAM-3773] JDBC #5399
[BEAM-3773] JDBC #5399
Conversation
Failed in |
run java precommit |
Nice. |
Archetypes more like argh!!!etypes |
@@ -83,7 +81,7 @@ public static void prepare() { | |||
.context(Contexts.EMPTY_CONTEXT) | |||
.ruleSets(BeamRuleSets.getRuleSets()) | |||
.costFactory(null) |
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.
@apilloud Could you run unit tests based on this class again? Some tests failed on my machine. It seems this test also need CalciteConnection
.
Correct me if I am wrong
Error:
java.sql.SQLException: No suitable driver found for jdbc:beam:
at java.sql.DriverManager.getConnection(DriverManager.java:689)
at java.sql.DriverManager.getConnection(DriverManager.java:270)
at org.apache.beam.sdk.extensions.sql.impl.JdbcDriverTest.testDriverManager_parse(JdbcDriverTest.java:56)
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.
Interesting. The tests pass for me. How are you running them? Are you using maven or gradle?
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.
@vectorijk Tests passed for me in both maven and gradle, and is passing in Jenkins. The issue you are seeing suggests that our JDBC driver is not being registered in your environment. This should be automatically done by the service file (META-INF/services/java.sql.Driver
). Can you try manually loading the driver at the start of the test? This line should do it:
Class.forName("org.apache.beam.sdk.extensions.sql.impl.JdbcDriver");
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! I think this is the issue. I will load the driver manually and test it again.
Add JDBC support to Beam SQL so we can use sqlline.
Follow this checklist to help us incorporate your contribution quickly and easily:
[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue../gradlew build
to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.