Skip to content

[REVIEW] Port unary cast to libcudf++#3397

Merged
jrhemstad merged 9 commits intorapidsai:branch-0.11from
trxcllnt:libcudf++/unaryops-cast
Nov 25, 2019
Merged

[REVIEW] Port unary cast to libcudf++#3397
jrhemstad merged 9 commits intorapidsai:branch-0.11from
trxcllnt:libcudf++/unaryops-cast

Conversation

@trxcllnt
Copy link
Copy Markdown
Contributor

Port unaryops cast for issue #2950, related to @codereport's PR #3214.

@trxcllnt trxcllnt requested review from a team as code owners November 17, 2019 10:45
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 17, 2019

Codecov Report

Merging #3397 into branch-0.11 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           branch-0.11    #3397   +/-   ##
============================================
  Coverage        87.36%   87.36%           
============================================
  Files               49       49           
  Lines             9295     9295           
============================================
  Hits              8121     8121           
  Misses            1174     1174

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f5e054...189e68a. Read the comment docs.

Copy link
Copy Markdown
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

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

Thanks for contributing this, @trxcllnt

@trxcllnt trxcllnt added the 3 - Ready for Review Ready for review by team label Nov 18, 2019
Copy link
Copy Markdown
Contributor

@codereport codereport left a comment

Choose a reason for hiding this comment

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

Looks good! (pending resolved CI failures).

@trxcllnt
Copy link
Copy Markdown
Contributor Author

rerun tests

@trxcllnt trxcllnt force-pushed the libcudf++/unaryops-cast branch from d9f5fff to dde73b2 Compare November 19, 2019 22:34
@trxcllnt
Copy link
Copy Markdown
Contributor Author

trxcllnt commented Nov 19, 2019

@jrhemstad I cleaned up the implementations and changed the signatures to return unique_ptr<column>. Now that #3232 is merged, I was thinking of updating this PR to call to_timestamps and from_timestamps when casting TS to/from strings. Does that sound like the right approach?

@jrhemstad
Copy link
Copy Markdown
Contributor

I was thinking of updating this PR to call to_timestamps and from_timestamps when casting TS to/from strings. Does that sound like the right approach?

If that's the expected behavior of casting to/from strings, then sure.

@trxcllnt
Copy link
Copy Markdown
Contributor Author

trxcllnt commented Nov 21, 2019

It would be convenient to have a single cudf::cast() method to convert columns to any other type, but after looking through the methods in cudf/strings/convert, I've decided against it.

Each string method takes different parameters based on the to/from type, and it isn't possible to define cast() overloads for each convert func parameter list. Better to guide people to those functions explicitly when they want to go to/from strings.

@harrism
Copy link
Copy Markdown
Member

harrism commented Nov 22, 2019

What's the status of this PR?

@trxcllnt
Copy link
Copy Markdown
Contributor Author

@harrism to answer your question, now that I've updated the cast docstring I think this is ready to merge.

@jrhemstad jrhemstad merged commit 741478b into rapidsai:branch-0.11 Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review Ready for review by team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants