Skip to content

Commit

Permalink
remove comma from assembly language of set op to make it cleaner (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
dshaaban01 authored Dec 26, 2024
1 parent 372856e commit 66a229b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def Substrait_SetOp : Substrait_RelOp<"set", [

let results = (outs Substrait_Relation:$result);
let assemblyFormat = [{
$kind `,` $inputs attr-dict `:` type($result)
$kind $inputs attr-dict `:` type($result)
}];
}

Expand Down
28 changes: 14 additions & 14 deletions test/Dialect/Substrait/set.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// CHECK: %[[V0:.*]] = named_table
// CHECK: %[[V1:.*]] = named_table
// CHECK: %[[V2:.*]] = named_table
// CHECK-NEXT: %[[V3:.*]] = set unspecified, %[[V0]], %[[V1]], %[[V2]]
// CHECK-NEXT: %[[V3:.*]] = set unspecified %[[V0]], %[[V1]], %[[V2]]
// CHECK-SAME: : tuple<si32>
// CHECK-NEXT: yield %[[V3]] : tuple<si32>

Expand All @@ -15,7 +15,7 @@ substrait.plan version 0 : 42 : 1 {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = named_table @t2 as ["c"] : tuple<si32>
%3 = set unspecified, %0, %1, %2: tuple<si32>
%3 = set unspecified %0, %1, %2: tuple<si32>
yield %3 : tuple<si32>
}
}
Expand All @@ -26,15 +26,15 @@ substrait.plan version 0 : 42 : 1 {
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table
// CHECK: %[[V1:.*]] = named_table
// CHECK-NEXT: %[[V2:.*]] = set minus_primary, %[[V0]], %[[V1]]
// CHECK-NEXT: %[[V2:.*]] = set minus_primary %[[V0]], %[[V1]]
// CHECK-SAME: : tuple<si32>
// CHECK-NEXT: yield %[[V2]] : tuple<si32>

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set minus_primary, %0, %1 : tuple<si32>
%2 = set minus_primary %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
Expand All @@ -45,15 +45,15 @@ substrait.plan version 0 : 42 : 1 {
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table
// CHECK: %[[V1:.*]] = named_table
// CHECK-NEXT: %[[V2:.*]] = set minus_multiset, %[[V0]], %[[V1]]
// CHECK-NEXT: %[[V2:.*]] = set minus_multiset %[[V0]], %[[V1]]
// CHECK-SAME: : tuple<si32>
// CHECK-NEXT: yield %[[V2]] : tuple<si32>

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set minus_multiset, %0, %1 : tuple<si32>
%2 = set minus_multiset %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
Expand All @@ -64,15 +64,15 @@ substrait.plan version 0 : 42 : 1 {
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table
// CHECK: %[[V1:.*]] = named_table
// CHECK-NEXT: %[[V2:.*]] = set intersection_primary, %[[V0]], %[[V1]]
// CHECK-NEXT: %[[V2:.*]] = set intersection_primary %[[V0]], %[[V1]]
// CHECK-SAME: : tuple<si32>
// CHECK-NEXT: yield %[[V2]] : tuple<si32>

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set intersection_primary, %0, %1 : tuple<si32>
%2 = set intersection_primary %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
Expand All @@ -83,15 +83,15 @@ substrait.plan version 0 : 42 : 1 {
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table
// CHECK: %[[V1:.*]] = named_table
// CHECK-NEXT: %[[V2:.*]] = set intersection_multiset, %[[V0]], %[[V1]]
// CHECK-NEXT: %[[V2:.*]] = set intersection_multiset %[[V0]], %[[V1]]
// CHECK-SAME: : tuple<si32>
// CHECK-NEXT: yield %[[V2]] : tuple<si32>

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set intersection_multiset, %0, %1 : tuple<si32>
%2 = set intersection_multiset %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
Expand All @@ -102,15 +102,15 @@ substrait.plan version 0 : 42 : 1 {
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table
// CHECK: %[[V1:.*]] = named_table
// CHECK-NEXT: %[[V2:.*]] = set union_distinct, %[[V0]], %[[V1]]
// CHECK-NEXT: %[[V2:.*]] = set union_distinct %[[V0]], %[[V1]]
// CHECK-SAME: : tuple<si32>
// CHECK-NEXT: yield %[[V2]] : tuple<si32>

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set union_distinct, %0, %1 : tuple<si32>
%2 = set union_distinct %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
Expand All @@ -121,15 +121,15 @@ substrait.plan version 0 : 42 : 1 {
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table
// CHECK: %[[V1:.*]] = named_table
// CHECK-NEXT: %[[V2:.*]] = set union_all, %[[V0]], %[[V1]]
// CHECK-NEXT: %[[V2:.*]] = set union_all %[[V0]], %[[V1]]
// CHECK-SAME: : tuple<si32>
// CHECK-NEXT: yield %[[V2]] : tuple<si32>

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set union_all, %0, %1 : tuple<si32>
%2 = set union_all %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
14 changes: 7 additions & 7 deletions test/Target/SubstraitPB/Export/set.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set unspecified, %0, %1 : tuple<si32>
%2 = set unspecified %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
Expand All @@ -51,7 +51,7 @@ substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set minus_primary, %0, %1 : tuple<si32>
%2 = set minus_primary %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
Expand All @@ -75,7 +75,7 @@ substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set minus_multiset, %0, %1 : tuple<si32>
%2 = set minus_multiset %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
Expand All @@ -99,7 +99,7 @@ substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set intersection_primary, %0, %1 : tuple<si32>
%2 = set intersection_primary %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
Expand All @@ -123,7 +123,7 @@ substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set intersection_multiset, %0, %1 : tuple<si32>
%2 = set intersection_multiset %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
Expand All @@ -147,7 +147,7 @@ substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set union_distinct, %0, %1 : tuple<si32>
%2 = set union_distinct %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
Expand All @@ -171,7 +171,7 @@ substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
%1 = named_table @t2 as ["b"] : tuple<si32>
%2 = set union_all, %0, %1 : tuple<si32>
%2 = set union_all %0, %1 : tuple<si32>
yield %2 : tuple<si32>
}
}
14 changes: 7 additions & 7 deletions test/Target/SubstraitPB/Import/set.textpb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# CHECK-NEXT: relation {
# CHECK-NEXT: %[[V0:.*]] = named_table
# CHECK-NEXT: %[[V1:.*]] = named_table
# CHECK-NEXT: %[[V2:.*]] = set unspecified, %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: %[[V2:.*]] = set unspecified %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: yield %[[V2]] : tuple<si32>

relations {
Expand Down Expand Up @@ -82,7 +82,7 @@ version {
# CHECK-NEXT: relation {
# CHECK-NEXT: %[[V0:.*]] = named_table
# CHECK-NEXT: %[[V1:.*]] = named_table
# CHECK-NEXT: %[[V2:.*]] = set minus_primary, %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: %[[V2:.*]] = set minus_primary %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: yield %[[V2]] : tuple<si32>

relations {
Expand Down Expand Up @@ -151,7 +151,7 @@ version {
# CHECK-NEXT: relation {
# CHECK-NEXT: %[[V0:.*]] = named_table
# CHECK-NEXT: %[[V1:.*]] = named_table
# CHECK-NEXT: %[[V2:.*]] = set minus_multiset, %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: %[[V2:.*]] = set minus_multiset %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: yield %[[V2]] : tuple<si32>

relations {
Expand Down Expand Up @@ -220,7 +220,7 @@ version {
# CHECK-NEXT: relation {
# CHECK-NEXT: %[[V0:.*]] = named_table
# CHECK-NEXT: %[[V1:.*]] = named_table
# CHECK-NEXT: %[[V2:.*]] = set intersection_primary, %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: %[[V2:.*]] = set intersection_primary %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: yield %[[V2]] : tuple<si32>

relations {
Expand Down Expand Up @@ -289,7 +289,7 @@ version {
# CHECK-NEXT: relation {
# CHECK-NEXT: %[[V0:.*]] = named_table
# CHECK-NEXT: %[[V1:.*]] = named_table
# CHECK-NEXT: %[[V2:.*]] = set intersection_multiset, %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: %[[V2:.*]] = set intersection_multiset %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: yield %[[V2]] : tuple<si32>

relations {
Expand Down Expand Up @@ -358,7 +358,7 @@ version {
# CHECK-NEXT: relation {
# CHECK-NEXT: %[[V0:.*]] = named_table
# CHECK-NEXT: %[[V1:.*]] = named_table
# CHECK-NEXT: %[[V2:.*]] = set union_distinct, %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: %[[V2:.*]] = set union_distinct %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: yield %[[V2]] : tuple<si32>

relations {
Expand Down Expand Up @@ -427,7 +427,7 @@ version {
# CHECK-NEXT: relation {
# CHECK-NEXT: %[[V0:.*]] = named_table
# CHECK-NEXT: %[[V1:.*]] = named_table
# CHECK-NEXT: %[[V2:.*]] = set union_all, %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: %[[V2:.*]] = set union_all %[[V0]], %[[V1]] : tuple<si32>
# CHECK-NEXT: yield %[[V2]] : tuple<si32>

relations {
Expand Down

0 comments on commit 66a229b

Please sign in to comment.