Skip to content

Commit

Permalink
chore: fix all test file spacing issues and remove redundant split in…
Browse files Browse the repository at this point in the history
…put file lines (#50)
  • Loading branch information
dshaaban01 authored Jan 9, 2025
1 parent 1f0050c commit 7234dc3
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 2 deletions.
8 changes: 8 additions & 0 deletions test/Dialect/Substrait/fetch.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ substrait.plan version 0 : 42 : 1 {
}
}

// -----

// CHECK-LABEL: substrait.plan
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table
Expand All @@ -31,6 +33,8 @@ substrait.plan version 0 : 42 : 1 {
}
}

// -----

// CHECK-LABEL: substrait.plan
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table
Expand All @@ -46,6 +50,8 @@ substrait.plan version 0 : 42 : 1 {
}
}

// -----

// CHECK-LABEL: substrait.plan
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table
Expand All @@ -61,6 +67,8 @@ substrait.plan version 0 : 42 : 1 {
}
}

// -----

// CHECK-LABEL: substrait.plan
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table
Expand Down
1 change: 0 additions & 1 deletion test/Dialect/Substrait/named-table-invalid.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ substrait.plan version 0 : 42 : 1 {
}
}


// -----

// Test error if providing duplicate field names in the same nesting level.
Expand Down
5 changes: 5 additions & 0 deletions test/Dialect/Substrait/named-table.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table @t1 as [] : tuple<>
// CHECK-NEXT: yield %[[V0]] :

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as [] : tuple<>
Expand All @@ -18,6 +19,7 @@ substrait.plan version 0 : 42 : 1 {
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table @t1 as ["a"] : tuple<si32>
// CHECK-NEXT: yield %[[V0]] :

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a"] : tuple<si32>
Expand All @@ -31,6 +33,7 @@ substrait.plan version 0 : 42 : 1 {
// CHECK: relation
// CHECK: %[[V0:.*]] = named_table @t1 as ["a", "b"] : tuple<si32, si32>
// CHECK-NEXT: yield %[[V0]] :

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a", "b"] : tuple<si32, si32>
Expand All @@ -45,6 +48,7 @@ substrait.plan version 0 : 42 : 1 {
// CHECK: %[[V0:.*]] = named_table @t1
// CHECK-SAME: as ["outer", "inner"] : tuple<tuple<si32>>
// CHECK-NEXT: yield %[[V0]] :

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["outer", "inner"] : tuple<tuple<si32>>
Expand All @@ -59,6 +63,7 @@ substrait.plan version 0 : 42 : 1 {
// CHECK: %[[V0:.*]] = named_table @t1
// CHECK-SAME: as ["a", "a"] : tuple<tuple<si32>>
// CHECK-NEXT: yield %[[V0]] :

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a", "a"] : tuple<tuple<si32>>
Expand Down
4 changes: 4 additions & 0 deletions test/Dialect/Substrait/plan.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// CHECK: substrait.plan version 0 : 42 : 1
// CHECK-SAME: git_hash "hash" producer "producer" {
// CHECK-NEXT: }

substrait.plan
version 0 : 42 : 1
git_hash "hash"
Expand All @@ -18,6 +19,7 @@ substrait.plan
// CHECK-NEXT: yield
// CHECK-NEXT: }
// CHECK-NEXT: }

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @foo::@bar as ["a", "b"] : tuple<si32, si32>
Expand All @@ -37,6 +39,7 @@ substrait.plan version 0 : 42 : 1 {
// CHECK-NEXT: yield
// CHECK-NEXT: }
// CHECK-NEXT: }

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @foo::@bar as ["a", "b"] : tuple<si32, si32>
Expand Down Expand Up @@ -74,6 +77,7 @@ substrait.plan version 0 : 42 : 1 {
// CHECK-NEXT: extension_uri @other.extension at "http://other.url/with/more/extensions.yml"
// CHECK-NEXT: extension_function @other.function at @other.extension["someotherfunc"]
// CHECK-NEXT: }

substrait.plan version 0 : 42 : 1 {
extension_uri @extension at "http://some.url/with/extensions.yml"
extension_function @function at @extension["somefunc"]
Expand Down
1 change: 1 addition & 0 deletions test/Dialect/Substrait/project-invalid.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ substrait.plan version 0 : 42 : 1 {
}

// -----

substrait.plan version 0 : 42 : 1 {
relation {
%0 = named_table @t1 as ["a", "b"] : tuple<si32, si32>
Expand Down
2 changes: 1 addition & 1 deletion test/Target/SubstraitPB/Export/plan.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// CHECK-DAG: git_hash: "hash"
// CHECK-DAG: producer: "producer"
// CHECK-NEXT: }

substrait.plan
version 0 : 42 : 1
git_hash "hash"
Expand Down Expand Up @@ -113,7 +114,6 @@ substrait.plan version 0 : 42 : 1 {

// -----


// CHECK: extension_uris {
// CHECK-NEXT: uri: "http://some.url/with/extensions.yml"
// CHECK: extension_uris {
Expand Down
2 changes: 2 additions & 0 deletions test/Target/SubstraitPB/Import/plan.textpb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# CHECK-LABEL: substrait.plan version 0 : 42 : 1
# CHECK-SAME: git_hash "hash" producer "producer" {
# CHECK-NEXT: }

version {
minor_number: 42
patch_number: 1
Expand All @@ -26,6 +27,7 @@ version {
# CHECK-NEXT: relation {
# CHECK-NEXT: %[[V0:.*]] = named_table @t1 as ["a", "b"] : tuple<si32, si32>
# CHECK-NEXT: yield %[[V0]] : tuple<si32, si32>

relations {
rel {
read {
Expand Down

0 comments on commit 7234dc3

Please sign in to comment.