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

Wrong decimal serialization #33

Closed
pprogs opened this issue Jun 1, 2020 · 2 comments
Closed

Wrong decimal serialization #33

pprogs opened this issue Jun 1, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@pprogs
Copy link

pprogs commented Jun 1, 2020

Привет!

В BinaryStreamWriter.cs
https://github.com/DarkWanderer/ClickHouse.Client/blob/master/ClickHouse.Client/Formats/BinaryStreamWriter.cs#L61

Не верно записывает отрицательные decimal значения (они становятся положительные и не верные)

Исправил по аналогии, как в нативной реализации
https://github.com/killwort/ClickHouse-Net/blob/master/ClickHouse.Ado/Impl/ColumnTypes/DecimalColumnType.cs#L52

Стало нормально.

@DarkWanderer
Copy link
Owner

Привет

https://github.com/killwort/ClickHouse-Net/blob/master/ClickHouse.Ado/Impl/ColumnTypes/DecimalColumnType.cs#L52 - это не нативная реализация, только копия :) Там кстати та же ошибка для Decimal128

Ошибку нашел, спасибо за репорт, исправлю

@DarkWanderer DarkWanderer added the bug Something isn't working label Jun 2, 2020
@DarkWanderer DarkWanderer self-assigned this Jun 2, 2020
@DarkWanderer
Copy link
Owner

Пофикшено в релизе 1.3

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