Skip to content
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

Add datetime as the equivalent python type to TimestampType #957

Merged
merged 2 commits into from
Oct 30, 2019

Conversation

harupy
Copy link
Contributor

@harupy harupy commented Oct 26, 2019

Resolves #951

@harupy
Copy link
Contributor Author

harupy commented Oct 26, 2019

Do I need to write a test?

@itholic
Copy link
Contributor

itholic commented Oct 26, 2019

@harupy i'm not sure but maybe it should be better in terms of usecase example? 😸
(But dont need to write the tests until ueshin or hyukjin comment about it)

@codecov-io
Copy link

codecov-io commented Oct 26, 2019

Codecov Report

Merging #957 into master will decrease coverage by 1.44%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #957      +/-   ##
==========================================
- Coverage   94.52%   93.07%   -1.45%     
==========================================
  Files          34       34              
  Lines        6466     6487      +21     
==========================================
- Hits         6112     6038      -74     
- Misses        354      449      +95
Impacted Files Coverage Δ
databricks/koalas/typedef.py 83.75% <ø> (ø) ⬆️
databricks/koalas/usage_logging/__init__.py 24.54% <0%> (-72.73%) ⬇️
databricks/koalas/usage_logging/usage_logger.py 50% <0%> (-50%) ⬇️
databricks/koalas/__init__.py 78.04% <0%> (-7.32%) ⬇️
databricks/conftest.py 93.61% <0%> (-4.26%) ⬇️
databricks/koalas/missing/frame.py 100% <0%> (ø) ⬆️
databricks/koalas/missing/indexes.py 100% <0%> (ø) ⬆️
databricks/koalas/plot.py 94.28% <0%> (ø) ⬆️
databricks/koalas/missing/series.py 100% <0%> (ø) ⬆️
databricks/koalas/frame.py 96.03% <0%> (ø) ⬆️
... and 4 more

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 1047a1d...5e01044. Read the comment docs.

@harupy
Copy link
Contributor Author

harupy commented Oct 28, 2019

@itholic Thanks for the comment. I'll wait for them.

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

Yea, let's add a simple test. It's a good practice to add a test whenever it's possible anyway :-).

@harupy
Copy link
Contributor Author

harupy commented Oct 28, 2019

@HyukjinKwon Ok, I'll add a test.

@harupy
Copy link
Contributor Author

harupy commented Oct 28, 2019

I'm thinking of adding the following code to test_map in test_series.py (link).

def tomorrow(date) -> datetime:
    return date + timedelta(days=1)

test_df = ks.DataFrame([datetime(2019, 10, 24)], columns=['date'])
test_df['date'] = test_df['date'].map(tomorrow)

@HyukjinKwon
Copy link
Member

Sounds good!

@softagram-bot
Copy link

Softagram Impact Report for pull/957 (head commit: 5e01044)

⭐ Change Overview

Showing the changed files, dependency changes and the impact - click for full size
(Open in Softagram Desktop for full details)

📄 Full report

Impact Report explained. Give feedback on this report to [email protected]

@harupy
Copy link
Contributor Author

harupy commented Oct 30, 2019

@HyukjinKwon test passed

@HyukjinKwon HyukjinKwon merged commit 8303ab1 into databricks:master Oct 30, 2019
@HyukjinKwon
Copy link
Member

Thanks, @harupy

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.

datetime.datetime is not recognized as the equivalent python type to types.TimestampType()
5 participants