-
Notifications
You must be signed in to change notification settings - Fork 448
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
JDBC PreparedStatement won't work with parameter as last element #45
Comments
@julianhowarth Thanks for that. Are you thinking you might prepare PR to fix this? |
I can do - do you have a set of contributor guidelines/requirements? |
Great, thanks Yes please see https://github.com/mapd/mapd-core#contributing |
What's the current status on this one? I see it has been three months since last update, may I take it after I'm done with #29? This one looks quite easy. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using release 3.1.1 and the associated jdbc driver lib.
In Java code, assuming properly set up connection:
fails with:
This is due to the
MapDPreparedStatement
at https://github.com/mapd/mapd-core/blob/master/java/mapdjdbc/src/main/java/com/mapd/jdbc/MapDPreparedStatement.java#L84 initially splitting the SQL String using.split
. The javadoc for that method states:Therefore the subsequent line of code calculates the number of expected parameters as zero.
A simple workaround is to include an additional space at the end of the statement i.e.
"SELECT x FROM t WHERE x = ? "
but that shouldn't really be necessary.The text was updated successfully, but these errors were encountered: