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

Feature request: print row data on which bulk writer got exception #188

Closed
devzerker opened this issue Aug 31, 2022 · 2 comments
Closed

Comments

@devzerker
Copy link

Now when WriteToServerAsync method called and something is wrong with one of rows, for example, type mismatch, it raises generic exception like null ref

System.NullReferenceException: Object reference not set to an instance of an object.
   at ClickHouse.Client.Types.ArrayType.Write(ExtendedBinaryWriter writer, Object value)
   at ClickHouse.Client.Copy.ClickHouseBulkCopy.PushBatch(ICollection`1 rows, ClickHouseType[] columnTypes, String[] columnNames, CancellationToken token)
   at ClickHouse.Client.Copy.ClickHouseBulkCopy.WriteToServerAsync(IEnumerable`1 rows, IReadOnlyCollection`1 columns, CancellationToken token)

And it hurts to find this row

@DarkWanderer
Copy link
Owner

5.1.0 now throws a richer exception which stores the data row involved. Does it cover your case?

@devzerker
Copy link
Author

Yep, thx!

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

2 participants