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

DBeaver: NumberFormatException when importing data into table with boolean column #112

Open
hlcianfagna opened this issue Apr 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@hlcianfagna
Copy link
Contributor

create table repro (flag BOOLEAN);

Then create a .csv file and try to import it from DBeaver with the default "Data load settings" with "Skip bind values during insert" not selected

flag
0

In CrateDB this will fail with

NumberFormatException in java.base/java.math.BigDecimal.<init>(BigDecimal.java:703).CXX000.FSQLExceptions.java.ResToCrateException.L152.Wio.crate.exceptions.SQLExceptions.esToCrateException(SQLExceptions.java:152)

in PostgreSQL it works
(DBeaver also succeeds if the column is INT instead of BOOLEAN or if we select the option to skip binding)

I can get the same stack trace in Java if I use a setBigDecimal against a PreparedStatement instead of a setBoolean , however this fails also against pgqsl while DBeaver works against pgsql.

So perhaps this something about pg_type not having composite type entries for the tables or about pg_description not having an entry for the boolean data type?

@amotl amotl changed the title NumberFormatException using DBeaver to import data into table with boolean column DBeaver: NumberFormatException when importing data into table with boolean column May 6, 2024
@amotl
Copy link
Member

amotl commented May 6, 2024

Hi @hlcianfagna. Thanks for your report.

Can I humbly ask you to evaluate the problem closer, maybe together with @surister, @seut, or @proddata, and maybe derive or transfer this issue into crate/crate, also tagging it with tool: DBeaver, when applicable?

@amotl amotl added the bug Something isn't working label May 28, 2024
@hlcianfagna
Copy link
Contributor Author

I did a quick test, this still occurs with the latest version of DBeaver and the latest nightly of CrateDB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants