Skip to content

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

Closed
wants to merge 23 commits into from
Closed

Conversation

llerrowa
Copy link

No description provided.

@github-actions
Copy link

Thanks for opening a pull request!

Could you open an issue for this pull request on JIRA?
https://issues.apache.org/jira/browse/ARROW

Then could you also rename pull request title in the following format?

ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}

See also:

@llerrowa llerrowa changed the title [ARROW-11422] [C#] add decimal support ARROW-11422: [C#] add decimal support Jan 28, 2021
@github-actions
Copy link

@emkornfield emkornfield requested a review from eerhardt February 2, 2021 04:14
@emkornfield
Copy link
Contributor

I'm not familiar with the C# implementation but note decimals can now be 128 or 256 bit.

Copy link
Contributor

@eerhardt eerhardt left a 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.

Copy link
Contributor

@eerhardt eerhardt left a 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.

Copy link
Contributor

@eerhardt eerhardt left a 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.

@eerhardt
Copy link
Contributor

eerhardt commented Mar 1, 2021

Can you also update

https://github.com/apache/arrow/blob/master/docs/source/status.rst

To check Decimal128 and Decimal256 support for C#?

Also, should be able to remove Decimal from the Not Implemented section of https://github.com/apache/arrow/blob/master/csharp/README.md

Copy link
Contributor

@eerhardt eerhardt left a 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.

Copy link
Contributor

@eerhardt eerhardt left a 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);
Copy link
Contributor

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?

Copy link
Author

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
Copy link
Contributor

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again!

@eerhardt
Copy link
Contributor

This fell of my radar, sorry! Merging.

@eerhardt eerhardt closed this in 0bea590 Mar 25, 2021
GeorgeAp pushed a commit to sirensolutions/arrow that referenced this pull request Jun 7, 2021
Closes apache#9356 from suchagit/master

Authored-by: Ali <alistair.worrell@gsacapital.com>
Signed-off-by: Eric Erhardt <eric.erhardt@microsoft.com>
michalursa pushed a commit to michalursa/arrow that referenced this pull request Jun 10, 2021
Closes apache#9356 from suchagit/master

Authored-by: Ali <alistair.worrell@gsacapital.com>
Signed-off-by: Eric Erhardt <eric.erhardt@microsoft.com>
michalursa pushed a commit to michalursa/arrow that referenced this pull request Jun 13, 2021
Closes apache#9356 from suchagit/master

Authored-by: Ali <alistair.worrell@gsacapital.com>
Signed-off-by: Eric Erhardt <eric.erhardt@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants