Skip to content

Conversation

@pitrou
Copy link
Member

@pitrou pitrou commented Jul 1, 2020

Also naturally available in Python using the Array.cast() method.

@github-actions
Copy link

github-actions bot commented Jul 1, 2020

@pitrou pitrou force-pushed the ARROW-7011-cast-float-to-decimal branch from 15432c7 to e753733 Compare July 1, 2020 20:17
Copy link
Member

@wesm wesm left a comment

Choose a reason for hiding this comment

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

This looks very reasonable to me, glad to see the conversion functions added. I had one question about generating multiple applicators based on the allow-truncation flag, absent benchmarks showing that it's makes a meaningful difference I'll quickly switch that to be a member variable and so generate less code

};

using SafeRealToDecimal = RealToDecimal<true>;
using UnsafeRealToDecimal = RealToDecimal<false>;
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure the performance benefit of pruning the AllowTruncate branch merits the 2x code size -- what do you think about making this flag just a member of the functor?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hum, yes, sounds fine. I initially thought the code would be more different, but it doesn't really make sense to generate two codepaths now.

@wesm
Copy link
Member

wesm commented Jul 2, 2020

Ugh there's that pesky flake again https://github.com/apache/arrow/pull/7612/checks?check_run_id=832227898

@kszucs did we determine whether it's feasible to get backtraces on macOS in GitHub Actions?

@wesm
Copy link
Member

wesm commented Jul 2, 2020

+1

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

Successfully merging this pull request may close these issues.

2 participants