-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
[BUG] Cannot load data using DataTable.Load due to "DataSet does not support System.Nullable<>" error #539
Comments
Hi, Can you try using
Or, alternatively,
|
Thank you for the workaround, it works the way you proposed, and the ExecuteDataTable is a great addition! It doesn't resolve the issue, though. The issue I face (and I think many other could have this as well) is that we've got an existing C#/.NET-based reporting solution that works with pure ADO.NET object model. It allows to select the source of data (by selecting a driver and providing property values), transform and visualize data, similarly to what Power BI does, but it's a custom one. Therefore I do not have the ability to change its code. If I had it, I would perhaps make and exception for ClickHouse. It would therefore be the best option if the ClickHouse.Client worked properly using the usual ADO.NET object model and typical code such as in my example above. That will certainly make the CH client more applicable. Thank you in advance for fixing this. The simplest query that shows the issue is |
Are you able to check if 7.8.3-aplha1 fixes your issue? |
The 7.8.3-aplha1 version fixes the issue. I tried various data types: string sql = "select toNullable(1), toNullable(1_000_000_000), toNullable(3.14), toNullable(now()), toNullable(True), toNullable('mystr')"; and it doesn't throw exception anymore. Big THANK YOU for the fix! Hope you'll be able to release a non-alpha version soon! |
Current Behavior
Using the following code:
I am getting NotSupportedException with the message "DataSet does not support System.Nullable<>" and the following stack trace:
The issue is that
DataTable.Load
incorrectly fills the data table column data types for nullable columns, i.e. it puts "Nullable`1[System.UInt64]". It should just put the base type there.I attribute it to ClickHouse driver, as it does not occur with other drivers.
Expected Behavior
I would expect it to just properly fill the data table.
Steps To Reproduce
I used .NET 8
Installed ClickHouse.Client from NuGet
Used the code above.
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: