Skip to content
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

Problems set null jdbc #179

Closed
andrelucasti opened this issue Jan 17, 2018 · 5 comments
Closed

Problems set null jdbc #179

andrelucasti opened this issue Jan 17, 2018 · 5 comments

Comments

@andrelucasti
Copy link

I have problem that when write my insert in the MapD through JDBC, with some parameters NULL using
statement.setNull(parameterIndex, null) it return exception

Caused by: java.sql.SQLException: Query failed : Syntax error at: ,
at com.mapd.jdbc.MapDStatement.executeQuery(MapDStatement.java:69)

the problem is that the mapd not support blank paramters ...

someone help me...

Thanks.

@RalphLoen
Copy link
Contributor

Hello Andre,
Since MapD itself doesn't support dynamic parameters, JDBC simulates this by substituting literal values for the question marks in the query. The current JDBC code mistakenly substitutes an empty string for the setNull method. When I substituted the string NULL, setNull() succeeded. I should have a fix available shortly at driver version 1.2.

@RalphLoen
Copy link
Contributor

e49f213 on ralph/setNull fixes the problem.

@andrelucasti
Copy link
Author

Thanks for attention @RalphLoen .
I did not find the commit "e49f213 on ralph/setNull fixes the problem."

Can you give me the commit link ?

Or... If i download it in the official site i will have the driver JDBC updated?

@RalphLoen
Copy link
Contributor

Hello Andre,
The change has not yet been approved for inclusion in our internal master code repository. After submission to the internal repository, pushes are periodically made to the public repository, at which point you can pull the fix into your code.

I'll ask Monday if we can get this moving.

@dwayneberry
Copy link
Contributor

closed with a8ef918

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants