Skip to content

Commit 2f5a805

Browse files
Removing stripMargin from test schemas
1 parent 191bc0d commit 2f5a805

File tree

1 file changed

+89
-89
lines changed

1 file changed

+89
-89
lines changed

sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTestData.scala

Lines changed: 89 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ private[sql] object ParquetTestData {
5656

5757
val testSchema =
5858
"""message myrecord {
59-
|optional boolean myboolean;
60-
|optional int32 myint;
61-
|optional binary mystring;
62-
|optional int64 mylong;
63-
|optional float myfloat;
64-
|optional double mydouble;
65-
|}""".stripMargin
59+
optional boolean myboolean;
60+
optional int32 myint;
61+
optional binary mystring;
62+
optional int64 mylong;
63+
optional float myfloat;
64+
optional double mydouble;
65+
}"""
6666

6767
// field names for test assertion error messages
6868
val testSchemaFieldNames = Seq(
@@ -76,23 +76,23 @@ private[sql] object ParquetTestData {
7676

7777
val subTestSchema =
7878
"""
79-
|message myrecord {
80-
|optional boolean myboolean;
81-
|optional int64 mylong;
82-
|}
83-
""".stripMargin
79+
message myrecord {
80+
optional boolean myboolean;
81+
optional int64 mylong;
82+
}
83+
"""
8484

8585
val testFilterSchema =
8686
"""
87-
|message myrecord {
88-
|required boolean myboolean;
89-
|required int32 myint;
90-
|required binary mystring;
91-
|required int64 mylong;
92-
|required float myfloat;
93-
|required double mydouble;
94-
|}
95-
""".stripMargin
87+
message myrecord {
88+
required boolean myboolean;
89+
required int32 myint;
90+
required binary mystring;
91+
required int64 mylong;
92+
required float myfloat;
93+
required double mydouble;
94+
}
95+
"""
9696

9797
// field names for test assertion error messages
9898
val subTestSchemaFieldNames = Seq(
@@ -118,84 +118,84 @@ private[sql] object ParquetTestData {
118118
// The "values" inside ownerPhoneNumbers is a keyword currently
119119
// so that array types can be translated correctly.
120120
"""
121-
|message AddressBook {
122-
|required binary owner;
123-
|optional group ownerPhoneNumbers {
124-
|repeated binary array;
125-
|}
126-
|optional group contacts {
127-
|repeated group array {
128-
|required binary name;
129-
|optional binary phoneNumber;
130-
|}
131-
|}
132-
|}
133-
""".stripMargin
121+
message AddressBook {
122+
required binary owner;
123+
optional group ownerPhoneNumbers {
124+
repeated binary array;
125+
}
126+
optional group contacts {
127+
repeated group array {
128+
required binary name;
129+
optional binary phoneNumber;
130+
}
131+
}
132+
}
133+
"""
134134

135135

136136
val testNestedSchema2 =
137137
"""
138-
|message TestNested2 {
139-
|required int32 firstInt;
140-
|optional int32 secondInt;
141-
|optional group longs {
142-
|repeated int64 array;
143-
|}
144-
|required group entries {
145-
|repeated group array {
146-
|required double value;
147-
|optional boolean truth;
148-
|}
149-
|}
150-
|optional group outerouter {
151-
|repeated group array {
152-
|repeated group array {
153-
|repeated int32 array;
154-
|}
155-
|}
156-
|}
157-
|}
158-
""".stripMargin
138+
message TestNested2 {
139+
required int32 firstInt;
140+
optional int32 secondInt;
141+
optional group longs {
142+
repeated int64 array;
143+
}
144+
required group entries {
145+
repeated group array {
146+
required double value;
147+
optional boolean truth;
148+
}
149+
}
150+
optional group outerouter {
151+
repeated group array {
152+
repeated group array {
153+
repeated int32 array;
154+
}
155+
}
156+
}
157+
}
158+
"""
159159

160160
val testNestedSchema3 =
161161
"""
162-
|message TestNested3 {
163-
|required int32 x;
164-
|optional group booleanNumberPairs {
165-
|repeated group array {
166-
|required int32 key;
167-
|optional group value {
168-
|repeated group array {
169-
|required double nestedValue;
170-
|optional boolean truth;
171-
|}
172-
|}
173-
|}
174-
|}
175-
|}
176-
""".stripMargin
162+
message TestNested3 {
163+
required int32 x;
164+
optional group booleanNumberPairs {
165+
repeated group array {
166+
required int32 key;
167+
optional group value {
168+
repeated group array {
169+
required double nestedValue;
170+
optional boolean truth;
171+
}
172+
}
173+
}
174+
}
175+
}
176+
"""
177177

178178
val testNestedSchema4 =
179179
"""
180-
|message TestNested4 {
181-
|required int32 x;
182-
|optional group data1 {
183-
|repeated group map {
184-
|required binary key;
185-
|required int32 value;
186-
|}
187-
|}
188-
|required group data2 {
189-
|repeated group map {
190-
|required binary key;
191-
|required group value {
192-
|required int64 payload1;
193-
|optional binary payload2;
194-
|}
195-
|}
196-
|}
197-
|}
198-
""".stripMargin
180+
message TestNested4 {
181+
required int32 x;
182+
optional group data1 {
183+
repeated group map {
184+
required binary key;
185+
required int32 value;
186+
}
187+
}
188+
required group data2 {
189+
repeated group map {
190+
required binary key;
191+
required group value {
192+
required int64 payload1;
193+
optional binary payload2;
194+
}
195+
}
196+
}
197+
}
198+
"""
199199

200200
val testNestedDir1 = Utils.createTempDir()
201201
val testNestedDir2 = Utils.createTempDir()

0 commit comments

Comments
 (0)