Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dshaaban01 committed Jan 21, 2025
1 parent 1f14743 commit d87e64d
Showing 1 changed file with 22 additions and 17 deletions.
39 changes: 22 additions & 17 deletions include/substrait-mlir/Dialect/Substrait/IR/SubstraitTypes.td
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,28 @@ def Substrait_BinaryType : Substrait_Type<"Binary", "binary"> {
}];
}

def Substrait_DateType : Substrait_Type<"Date", "date"> {
let summary = "Substrait date type";
let description = [{
This type represents a substrait date type.
}];
}

def Substrait_DateAttr : Substrait_Attr<"Date", "date",
[TypedAttrInterface]> {
let summary = "Substrait date type";
let description = [{
This type represents a substrait date attribute type.
}];
let parameters = (ins "int32_t":$value);
let assemblyFormat = [{ `<` $value `>` }];
let extraClassDeclaration = [{
::mlir::Type getType() const {
return DateType::get(getContext());
}
}];
}

def Substrait_StringType : Substrait_Type<"String", "string"> {
let summary = "Substrait string type";
let description = [{
Expand Down Expand Up @@ -84,23 +106,6 @@ def Substrait_TimestampTzAttr : Substrait_Attr<"TimestampTz", "timestamp_tz",
}];
}

def Substrait_DateType : Substrait_Type<"Date", "date"> {
let summary = "Substrait date type";
let description = [{
This type represents a substrait date type.
}];
}

def Substrait_DateAttr : Substrait_Attr<"Date", "date",
[DeclareAttrInterfaceMethods<TypedAttrInterface>]> {
let summary = "Substrait date type";
let description = [{
This type represents a substrait date attribute type.
}];
let parameters = (ins "int32_t":$value);
let assemblyFormat = [{ `<` $value `>` }];
}

/// Currently supported atomic types. These correspond directly to the types in
/// https://github.com/substrait-io/substrait/blob/main/proto/substrait/type.proto.
// TODO(ingomueller): Add the other low-hanging fruits here.
Expand Down

0 comments on commit d87e64d

Please sign in to comment.