Skip to content

feat: add strftime#4146

Merged
universalmind303 merged 8 commits intomainfrom
universalmind303/dt-to_string
Apr 9, 2025
Merged

feat: add strftime#4146
universalmind303 merged 8 commits intomainfrom
universalmind303/dt-to_string

Conversation

@universalmind303
Copy link
Copy Markdown
Member

Changes Made

  • adds to_string/strftime.

Note for reviewers.

on the python side I added both to_string and strftime, but on sql I only added strftime.

The reasoning is that because we don't yet have namespaced prefixes on sql, so to_string is pretty generic, but on python it's dt.to_string which fits with our str.to_date and str.to_datetime.

Related Issues

closes #4094

Checklist

  • Documented in API Docs (if applicable)
  • [n/a] Documented in User Guide (if applicable)
  • [n/a] If adding a new documentation page, doc is added to docs/mkdocs.yml navigation
  • [n/a] Documentation builds and is formatted properly (tag @/ccmao1130 for docs review)

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2025

Codecov Report

Attention: Patch coverage is 69.66292% with 27 lines in your changes missing coverage. Please review.

Project coverage is 78.38%. Comparing base (60a3710) to head (0080ae6).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/daft-functions/src/temporal/mod.rs 69.23% 12 Missing ⚠️
src/daft-sql/src/modules/temporal.rs 62.96% 10 Missing ⚠️
src/daft-core/src/series/ops/time.rs 63.63% 4 Missing ⚠️
src/daft-functions/src/python/temporal.rs 75.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4146      +/-   ##
==========================================
- Coverage   78.38%   78.38%   -0.01%     
==========================================
  Files         796      796              
  Lines      103621   103710      +89     
==========================================
+ Hits        81226    81288      +62     
- Misses      22395    22422      +27     
Files with missing lines Coverage Δ
daft/expressions/expressions.py 93.89% <100.00%> (+0.01%) ⬆️
daft/series.py 89.46% <100.00%> (+0.02%) ⬆️
src/daft-core/src/array/ops/time.rs 87.44% <ø> (ø)
src/daft-core/src/python/series.rs 93.57% <100.00%> (+0.02%) ⬆️
src/daft-functions/src/python/mod.rs 100.00% <100.00%> (ø)
src/daft-functions/src/python/temporal.rs 91.66% <75.00%> (-8.34%) ⬇️
src/daft-core/src/series/ops/time.rs 66.34% <63.63%> (-0.16%) ⬇️
src/daft-sql/src/modules/temporal.rs 81.90% <62.96%> (-6.56%) ⬇️
src/daft-functions/src/temporal/mod.rs 66.47% <69.23%> (+0.78%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@universalmind303 universalmind303 changed the title feat: add to_string/strftime feat: add strftime Apr 7, 2025
@universalmind303 universalmind303 force-pushed the universalmind303/dt-to_string branch from 2eaa60d to 6056e76 Compare April 8, 2025 16:04
@universalmind303 universalmind303 enabled auto-merge (squash) April 9, 2025 19:47
@universalmind303 universalmind303 merged commit 923ff62 into main Apr 9, 2025
49 of 50 checks passed
@universalmind303 universalmind303 deleted the universalmind303/dt-to_string branch April 9, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dt.millisecond, dt.microsecond, dt.nanosecond, dt.ordinal_day, dt.timestamp, dt.to_string (or dt.strftime)

2 participants