diff --git a/include/substrait-mlir/Dialect/Substrait/IR/SubstraitOps.td b/include/substrait-mlir/Dialect/Substrait/IR/SubstraitOps.td index 977afa9..8f0accf 100644 --- a/include/substrait-mlir/Dialect/Substrait/IR/SubstraitOps.td +++ b/include/substrait-mlir/Dialect/Substrait/IR/SubstraitOps.td @@ -394,6 +394,9 @@ def Substrait_UnionDistinct_Op : Substrait_RelOp<"union_distinct"> { ); let results = (outs Substrait_Relation:$result); + let assemblyFormat = [{ + $left `u` $right attr-dict `:` type($left) `u` type($right) `->` type($result) + }]; } def Substrait_EmitOp : Substrait_RelOp<"emit", [ diff --git a/test/Dialect/Substrait/union-distinct.mlir b/test/Dialect/Substrait/union-distinct.mlir index 96551f3..0c2848f 100644 --- a/test/Dialect/Substrait/union-distinct.mlir +++ b/test/Dialect/Substrait/union-distinct.mlir @@ -5,15 +5,16 @@ // CHECK: relation // CHECK: %[[V0:.*]] = named_table // CHECK: %[[V1:.*]] = named_table -// CHECK-NEXT: %[[V2:.*]] = "substrait.union_distinct"(%[[V0]], %[[V1]]) -// CHECK-SAME: : (tuple, tuple) -> tuple +// CHECK-NEXT: %[[V2:.*]] = union_distinct %[[V0]] u %[[V1]] +// CHECK-SAME: : tuple u tuple -> tuple // CHECK-NEXT: yield %[[V2]] : tuple + substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = "substrait.union_distinct"(%0 , %1) : (tuple,tuple) -> tuple + %2 = union_distinct %0 u %1 : tuple u tuple -> tuple yield %2 : tuple } }