From 66a229bccf352423b525494abda011fec311ef6e Mon Sep 17 00:00:00 2001 From: Dalia Shaaban <144673861+dshaaban01@users.noreply.github.com> Date: Thu, 26 Dec 2024 22:11:08 +0100 Subject: [PATCH] remove comma from assembly language of set op to make it cleaner (#35) --- .../Dialect/Substrait/IR/SubstraitOps.td | 2 +- test/Dialect/Substrait/set.mlir | 28 +++++++++---------- test/Target/SubstraitPB/Export/set.mlir | 14 +++++----- test/Target/SubstraitPB/Import/set.textpb | 14 +++++----- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/include/substrait-mlir/Dialect/Substrait/IR/SubstraitOps.td b/include/substrait-mlir/Dialect/Substrait/IR/SubstraitOps.td index 1fc3e5e..e2e1198 100644 --- a/include/substrait-mlir/Dialect/Substrait/IR/SubstraitOps.td +++ b/include/substrait-mlir/Dialect/Substrait/IR/SubstraitOps.td @@ -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) }]; } diff --git a/test/Dialect/Substrait/set.mlir b/test/Dialect/Substrait/set.mlir index 2fdd1a0..a495224 100644 --- a/test/Dialect/Substrait/set.mlir +++ b/test/Dialect/Substrait/set.mlir @@ -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 // CHECK-NEXT: yield %[[V3]] : tuple @@ -15,7 +15,7 @@ substrait.plan version 0 : 42 : 1 { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple %2 = named_table @t2 as ["c"] : tuple - %3 = set unspecified, %0, %1, %2: tuple + %3 = set unspecified %0, %1, %2: tuple yield %3 : tuple } } @@ -26,7 +26,7 @@ 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 // CHECK-NEXT: yield %[[V2]] : tuple @@ -34,7 +34,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set minus_primary, %0, %1 : tuple + %2 = set minus_primary %0, %1 : tuple yield %2 : tuple } } @@ -45,7 +45,7 @@ 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 // CHECK-NEXT: yield %[[V2]] : tuple @@ -53,7 +53,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set minus_multiset, %0, %1 : tuple + %2 = set minus_multiset %0, %1 : tuple yield %2 : tuple } } @@ -64,7 +64,7 @@ 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 // CHECK-NEXT: yield %[[V2]] : tuple @@ -72,7 +72,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set intersection_primary, %0, %1 : tuple + %2 = set intersection_primary %0, %1 : tuple yield %2 : tuple } } @@ -83,7 +83,7 @@ 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 // CHECK-NEXT: yield %[[V2]] : tuple @@ -91,7 +91,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set intersection_multiset, %0, %1 : tuple + %2 = set intersection_multiset %0, %1 : tuple yield %2 : tuple } } @@ -102,7 +102,7 @@ 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 // CHECK-NEXT: yield %[[V2]] : tuple @@ -110,7 +110,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set union_distinct, %0, %1 : tuple + %2 = set union_distinct %0, %1 : tuple yield %2 : tuple } } @@ -121,7 +121,7 @@ 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 // CHECK-NEXT: yield %[[V2]] : tuple @@ -129,7 +129,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set union_all, %0, %1 : tuple + %2 = set union_all %0, %1 : tuple yield %2 : tuple } } diff --git a/test/Target/SubstraitPB/Export/set.mlir b/test/Target/SubstraitPB/Export/set.mlir index 2a3920b..1ca78e3 100644 --- a/test/Target/SubstraitPB/Export/set.mlir +++ b/test/Target/SubstraitPB/Export/set.mlir @@ -27,7 +27,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set unspecified, %0, %1 : tuple + %2 = set unspecified %0, %1 : tuple yield %2 : tuple } } @@ -51,7 +51,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set minus_primary, %0, %1 : tuple + %2 = set minus_primary %0, %1 : tuple yield %2 : tuple } } @@ -75,7 +75,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set minus_multiset, %0, %1 : tuple + %2 = set minus_multiset %0, %1 : tuple yield %2 : tuple } } @@ -99,7 +99,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set intersection_primary, %0, %1 : tuple + %2 = set intersection_primary %0, %1 : tuple yield %2 : tuple } } @@ -123,7 +123,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set intersection_multiset, %0, %1 : tuple + %2 = set intersection_multiset %0, %1 : tuple yield %2 : tuple } } @@ -147,7 +147,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set union_distinct, %0, %1 : tuple + %2 = set union_distinct %0, %1 : tuple yield %2 : tuple } } @@ -171,7 +171,7 @@ substrait.plan version 0 : 42 : 1 { relation { %0 = named_table @t1 as ["a"] : tuple %1 = named_table @t2 as ["b"] : tuple - %2 = set union_all, %0, %1 : tuple + %2 = set union_all %0, %1 : tuple yield %2 : tuple } } \ No newline at end of file diff --git a/test/Target/SubstraitPB/Import/set.textpb b/test/Target/SubstraitPB/Import/set.textpb index 03aa1be..19f5a8d 100644 --- a/test/Target/SubstraitPB/Import/set.textpb +++ b/test/Target/SubstraitPB/Import/set.textpb @@ -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 +# CHECK-NEXT: %[[V2:.*]] = set unspecified %[[V0]], %[[V1]] : tuple # CHECK-NEXT: yield %[[V2]] : tuple relations { @@ -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 +# CHECK-NEXT: %[[V2:.*]] = set minus_primary %[[V0]], %[[V1]] : tuple # CHECK-NEXT: yield %[[V2]] : tuple relations { @@ -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 +# CHECK-NEXT: %[[V2:.*]] = set minus_multiset %[[V0]], %[[V1]] : tuple # CHECK-NEXT: yield %[[V2]] : tuple relations { @@ -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 +# CHECK-NEXT: %[[V2:.*]] = set intersection_primary %[[V0]], %[[V1]] : tuple # CHECK-NEXT: yield %[[V2]] : tuple relations { @@ -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 +# CHECK-NEXT: %[[V2:.*]] = set intersection_multiset %[[V0]], %[[V1]] : tuple # CHECK-NEXT: yield %[[V2]] : tuple relations { @@ -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 +# CHECK-NEXT: %[[V2:.*]] = set union_distinct %[[V0]], %[[V1]] : tuple # CHECK-NEXT: yield %[[V2]] : tuple relations { @@ -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 +# CHECK-NEXT: %[[V2:.*]] = set union_all %[[V0]], %[[V1]] : tuple # CHECK-NEXT: yield %[[V2]] : tuple relations {