Skip to content

Commit

Permalink
style: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Oct 8, 2024
1 parent e498edd commit b2bbfe3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ibis/backends/polars/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,13 +954,15 @@ def string_to_date(op, **kw):
format=_literal_value(op.format_str),
)


@translate.register(ops.StringToTime)
def string_to_time(op, **kw):
arg = translate(op.arg, **kw)
return arg.str.to_time(
format=_literal_value(op.format_str),
)


@translate.register(ops.StringToTimestamp)
def string_to_timestamp(op, **kw):
arg = translate(op.arg, **kw)
Expand Down
2 changes: 2 additions & 0 deletions ibis/expr/operations/temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class StringToDate(Value):
shape = rlz.shape_like("args")
dtype = dt.date


@public
class StringToTime(Value):
"""Convert a string to a time."""
Expand All @@ -103,6 +104,7 @@ class StringToTime(Value):
shape = rlz.shape_like("args")
dtype = dt.time


@public
class ExtractTemporalField(Unary):
"""Extract a field from a temporal value."""
Expand Down

0 comments on commit b2bbfe3

Please sign in to comment.