@@ -62,6 +62,28 @@ def Substrait_StringType : Substrait_Type<"String", "string"> {
6262 }];
6363}
6464
65+ def Substrait_TimeType : Substrait_Type<"Time", "time"> {
66+ let summary = "Substrait time type";
67+ let description = [{
68+ This type represents a substrait time type.
69+ }];
70+ }
71+
72+ def Substrait_TimeAttr : Substrait_Attr<"Time", "time",
73+ [TypedAttrInterface]> {
74+ let summary = "Substrait time type";
75+ let description = [{
76+ This type represents a substrait time attribute type.
77+ }];
78+ let parameters = (ins "int64_t":$value);
79+ let assemblyFormat = [{ `<` $value `` `us` `>` }];
80+ let extraClassDeclaration = [{
81+ ::mlir::Type getType() const {
82+ return TimeType::get(getContext());
83+ }
84+ }];
85+ }
86+
6587def Substrait_TimestampType : Substrait_Type<"Timestamp", "timestamp"> {
6688 let summary = "Substrait timezone-unaware timestamp type";
6789 let description = [{
@@ -124,6 +146,7 @@ def Substrait_AtomicTypes {
124146 Substrait_TimestampType, // Timestamp
125147 Substrait_TimestampTzType, // TimestampTZ
126148 Substrait_DateType, // Date
149+ Substrait_TimeType, // Time
127150 ];
128151}
129152
@@ -143,6 +166,7 @@ def Substrait_AtomicAttributes {
143166 Substrait_TimestampAttr, // Timestamp
144167 Substrait_TimestampTzAttr, // TimestampTZ
145168 Substrait_DateAttr, // Date
169+ Substrait_TimeAttr, // Time
146170 ];
147171}
148172
0 commit comments