File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
python/xorq/backends/let/datafusion Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11from __future__ import annotations
22
33import itertools
4+ import typing
45from urllib .parse import parse_qs , urlsplit
56
67import pyarrow as pa
@@ -132,12 +133,11 @@ def regex_split(s: str, pattern: str) -> list[str]:
132133
133134
134135def temporal_strftime (array : dt .Timestamp (scale = 9 ), pattern : dt .string ) -> dt .string :
135- patterns = pattern .unique ()
136+ pattern , * _rest = typing . cast ( pa . StringArray , pattern ) .unique (). to_pylist ()
136137
137- if len (patterns ) != 1 :
138+ if len (_rest ) > 0 :
138139 raise com .XorqError (
139140 "Only a single scalar pattern is supported for DataFusion strftime"
140141 )
141142
142- pattern = patterns [0 ].as_py ()
143143 return pc .strftime (array , pattern )
You can’t perform that action at this time.
0 commit comments