Skip to content

Commit f8f72f0

Browse files
committed
ref: refactor extension_registry better exception handling, naming and added function type
1 parent 799b8a9 commit f8f72f0

File tree

10 files changed

+785
-497
lines changed

10 files changed

+785
-497
lines changed

src/substrait/builders/type.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,16 @@ def precision_timestamp_tz(precision: int, nullable=True) -> stt.Type:
223223
)
224224

225225

226+
def timestamp(nullable=True) -> stt.Type:
227+
return stt.Type(
228+
timestamp=stt.Type.Timestamp(
229+
nullability=stt.Type.NULLABILITY_NULLABLE
230+
if nullable
231+
else stt.Type.NULLABILITY_REQUIRED,
232+
)
233+
)
234+
235+
226236
def struct(types: Iterable[stt.Type], nullable=True) -> stt.Type:
227237
return stt.Type(
228238
struct=stt.Type.Struct(

0 commit comments

Comments
 (0)