-
Notifications
You must be signed in to change notification settings - Fork 3.8k
ARROW-11422: [C#] add decimal support #9356
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
Conversation
Thanks for opening a pull request! Could you open an issue for this pull request on JIRA? Then could you also rename pull request title in the following format?
See also: |
I'm not familiar with the C# implementation but note decimals can now be 128 or 256 bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe PrimitiveArray<decimal>
is the right thing to use here because the memory layout between C# and Arrow are different.
Check out the C++ or Java implementations to see how the Arrow decimal values are encoded.
d4608a9
to
356c300
Compare
using a fixed size binary array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good start. Here are my first round of comments.
expose ValueBuffer on FixedSizeBinaryArray and the visitor pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really good! Thanks for the good work here @suchagit.
I think after this round of feedback is addressed, it should be ready to be merged.
Can you also update https://github.com/apache/arrow/blob/master/docs/source/status.rst To check Also, should be able to remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments on DecimalUtility. But I think this is really close. Thanks for all the good work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have one tiny comment on a test. If necessary we can fix it in a follow up PR.
But this looks great! Thanks for the great contribution here and helping fill out the C# Arrow library.
I will merge this later today, or early tomorrow unless it receives more feedback.
} | ||
else | ||
{ | ||
builder.Append(d); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be helpful to get the value back out and make sure it is the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, that's done now
the decimal we append should match what we read back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again!
This fell of my radar, sorry! Merging. |
Closes apache#9356 from suchagit/master Authored-by: Ali <alistair.worrell@gsacapital.com> Signed-off-by: Eric Erhardt <eric.erhardt@microsoft.com>
Closes apache#9356 from suchagit/master Authored-by: Ali <alistair.worrell@gsacapital.com> Signed-off-by: Eric Erhardt <eric.erhardt@microsoft.com>
Closes apache#9356 from suchagit/master Authored-by: Ali <alistair.worrell@gsacapital.com> Signed-off-by: Eric Erhardt <eric.erhardt@microsoft.com>
No description provided.