-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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 support for prepared statements in JDBC driver #1195
Comments
Do you guys have any updates on this issue? |
I will take this one. |
This requires a new API on the server or adding placeholders to the parser and doing it in the driver. |
Yes, I was doing the latter. Anyway, I was told that in Teradata there is ongoing effort to provide ODBC/JDBC, so I think it will better if I switch to other task. I don't know what is going to be supported and when exactly, but I would prefer to wait for that before doing this ticket. |
This is a showstopper for us, as the 3rd party software we want to connect to Presto via JDBC relies on prepared statements. Are there any plans on implementing this in the near future? |
+1 |
1 similar comment
+1 |
lemme add my desire to see this implemented as well. I'm finding that Pentaho/PDI makes a call to prepareStatment() as well and boom that stops the show right there. Any updates from the Teradata guys by chance? (i see from the OP that the executeQuery() works just fine and that 3rd party apps that use that probably will work fine) |
in my experience Pentaho does call prepareStatment only if you use queries with parameters @spragues-trulia. regarding Teradata, the info i got is that this is in their roadmap but there is currently no team allocated to parametric queries impl. |
From the Teradata side, our recently released ODBC driver fakes prepared statement support. Namely, the driver wraps SELECT queries with LIMIT 0 to get the metadata, meaning that when prepared statements are used, the driver executes two queries, one with LIMIT 0 and then the actual query. That means there's a performance penalty, and there also may be cases where the metadata isn't exactly the same with and without LIMIT 0. That ODBC driver (as well as the Teradata-certified Presto release and presto-admin) can be found at www.teradata.com/presto. So you can give it a try! We are also indeed looking into adding support to Presto (which is ideally what should happen), but haven't started that work yet. |
Thanks @albertocsm & @cawallin . Wouldn't you have known it after i updated this ticket i checked my email and that's where i saw Teradata's announcement of the new ODBC driver on the presto-user mail list. Figures. We'll give it the 'ol one-two today or tomorrow and report our findings back here. This workaround might be enough to get things to play nice together! That'd be a huge first step. And thanks again for your responses! |
hi guys we're still working on this. we managed to get the iODBC command line test utility to communicate with presto in fine order but still struggling a little with Pentaho/PDI using it. need to study this a bit more to make Pentaho aware of this new odbc.ini file as that's not quite clear at the moment where Pentaho presently picks up its odbc config information. we'll get there just need some more time. I will say though - my opinion only - the jdbc driver setup wins on simplicity hands down! :) |
and i just found this: http://wiki.pentaho.com/pages/viewpage.action?pageId=14850644 . I think engaging Pentaho support might be the prudent next move (for us) before we spend more time going down the rabbit hole. |
Now that #4412 is merged, I think it's a good timing to revisit this issue for supporting Prepared Statements in JDBC. |
Inside java code too using HikariDataSource and Jooq
|
other places mention that this should be fixed by 0.153 but I'm using 0.157 and still get NotImplementedException. |
This is still being worked on. |
@electrum How to integrate spring JPA using presto-jdbc ? |
@handsetvn -- can you file a new issue with the query that failed and the full stacktrace? Your problem seems unrelated to this issue. |
java.sql.SQLException: Method Connection.prepareStatement is not yet implemented with presto-jdbc-0.157.jar . Iam using dbutils to run the query with result handler. I can able to connect and get the results as given in samples but while (rs.next()) is slow . Could any one help , to get the result set using result handler. |
@cawallin 2016-11-29 22:36:42.551 INFO 15341 --- [ main] n.cero.sqltemplate.example.Application : Starting Application on longtran with PID 15341 (/home/longtran/Downloads/sqltemplate-master/bootiful-sqltemplate-example/target/classes started by longtran in /home/longtran/Downloads/sqltemplate-master/bootiful-sqltemplate-example) |
@electrum we are getting the following exception, while trying to use result handler . you have mentioned in your previous comments that its being worked on. When can we expect it or if there is any workaround. Please let us know. java.sql.SQLException: Method Connection.prepareStatement is not yet implemented with presto-jdbc-0.157.jar |
+1 on it, any roadmap to implement it ? |
+1 on it, post us some expected time to accomplish. |
+1 on it, any roadmap ? |
+1 Still affecting Presto 0.166 |
I do not believe anyone is working right now on adding support for prepared statement to open-source JDBC drive. I would keep this issue as an remainder. Yet I suggest you try to use closed source driver which is part of Teradata Presto distribution available here: www.teradata.com/presto. It supports prepared statements. |
Blocked/impacted by #5759 |
+1 Still affecting Presto 0.183 |
+1 Still affecting Presto 0.187 |
+1 Still affecting Presto 0.189 Cause: com.facebook.presto.jdbc.NotImplementedException: Method Connection.prepareStatement is not yet implemented |
+1 presto-jdbc 0.189 update |
+1 |
1 similar comment
+1 |
Still affecting Presto 0.200 |
Yes - trying to use DBVisualizer to query Linked tables. Can create the linked table, but not query S3 using Presto 0.2 |
This is done in #10673 |
awesome! do I need a new .jar file?
I'm
…On Tue, May 22, 2018 at 11:46 AM, David Phillips ***@***.***> wrote:
This is done in #10673 <#10673>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1195 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYCMaLwxI-jZGxJgob-_kcWGPb8haVE0ks5t1DLZgaJpZM4ByiKS>
.
|
It is not merged yet, but should be in the 0.203 release. If you want to use it sooner, you will need to build a patched version locally with the change from that PR. |
@electrum still not available :( |
Any idea when?
From: Igor <notifications@github.com>
Sent: Wednesday, June 6, 2018 4:51 AM
To: prestodb/presto <presto@noreply.github.com>
Cc: Mlnard1 <mn.gotswell@gmail.com>; Comment <comment@noreply.github.com>
Subject: Re: [prestodb/presto] Add support for prepared statements in JDBC driver (#1195)
@electrum <https://github.com/electrum> still not available :(
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#1195 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AYCMaEZtURQxy-xBIgV_VtytCJL3JcIpks5t55gKgaJpZM4ByiKS> . <https://github.com/notifications/beacon/AYCMaFlnYZmyl6aU-7AxUVUTvmIUSMvuks5t55gKgaJpZM4ByiKS.gif>
|
+1 still not available in the 0.203 release |
Building master locally; 205-SNAPSHOT runs queries generated from Anorm; which up to 204 error-ed on prepared statements. |
I'm using presto-jdbc-0.66-SNAPSHOT.jar, and trying to execute presto query to presto-server on my java application.
Below sample code, using jdbc statement, is working well.
However, using jdbc preparedstatement, throw exception.
Is presto-jdbc not support yet "preparedstatement" ?
Here's my test code and exception info.
Test Code :
Exception Info :
The text was updated successfully, but these errors were encountered: