Giorgi / DuckDB.NET

Bindings and ADO.NET Provider for DuckDB
https://duckdb.net
MIT License
343 stars 62 forks source link

DecimalParameter not supported on culture not using the point as decimal separator #90

Closed Seddryck closed 1 year ago

Seddryck commented 1 year ago

When running current test-suite on a computer with a configuration where the point is not the decimal separator, the following test is failing:

DuckDB.NET.Test.Parameters.DecimalParameterTests.InsertSelectValueTest
   Source: DecimalParameterTest.cs line 39
   Duration: 7 ms

  Message: 
DuckDB.NET.Data.DuckDBException : Conversion Error: Could not convert string "0,5" to DECIMAL(38,15)

  Stack Trace: 
PreparedStatement.Execute(DuckDBParameterCollection parameterCollection) line 67
DuckDbCommand.ExecuteNonQuery() line 68
DecimalParameterTests.<InsertSelectValueTest>g__DecimalTests|1_0(Decimal[] values, Int32 precision, Int32 scale, <>c__DisplayClass1_0& ) line 72
DecimalParameterTests.InsertSelectValueTest() line 45

Also the test DecimalParameterTests.SimpleTest is sensitive to culture.

Seddryck commented 1 year ago

I'm working on it and will submit a PR.

Giorgi commented 1 year ago

@Seddryck Thanks!