You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "westonpace (via GitHub)" <gi...@apache.org> on 2023/04/18 15:12:55 UTC
[GitHub] [arrow] westonpace commented on a diff in pull request #35183: GH-35175: [C#] Decimal128 / 256 Types should alloc dynamic byteWidth based on precision and scale
westonpace commented on code in PR #35183:
URL: https://github.com/apache/arrow/pull/35183#discussion_r1170189235
##########
csharp/test/Apache.Arrow.Tests/Decimal128ArrayTests.cs:
##########
@@ -41,7 +40,7 @@ public void AppendThenGetGivesNull()
var array = builder.Build();
Assert.Equal(3, array.Length);
- Assert.Equal(array.Data.Buffers[1].Length, array.ByteWidth * 3);
+ Assert.Equal(array.Data.Buffers[1].Length, array.ByteWidth * 3 + array.ByteWidth - 1);
Review Comment:
Decimal64 is a challenging type that has a pretty limited range. It doesn't cover very many gaps that double (double can perfectly represent 57 bits of decimal I believe) doesn't already take care of. But it isn't unheard of. In fact, some engines (e.g. I think clickhouse) have support for Decimal32.
There have been discussions in the past [1][2]. I think there would be general support for adding new narrow decimal types but no committer has been motivated to do that work.
[1] https://lists.apache.org/thread/wrgqzlr8pogl9674wgxjo6k12xl7n7cs
[2] https://lists.apache.org/thread/9ynjmjlxm44j2pt443mcr2hmdl7m43yz
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org