Skip to content

Commit 816a26f

Browse files
committed
Merge branch 'preparser' of github.com:srielau/spark into preparser
2 parents b30a9c6 + d9a53a8 commit 816a26f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ParserUtilsSuite.scala

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* this work for additional information regarding copyright ownership.
55
* The ASF licenses this file to You under the Apache License, Version 2.0
66
* (the "License"); you may not use this file except in compliance with
7-
* the License. You may obtain a copy of the License at
7+
* the License. You may obtain a copy of the License at
88
*
99
* http://www.apache.org/licenses/LICENSE-2.0
1010
*
@@ -206,6 +206,7 @@ class ParserUtilsSuite extends SparkFunSuite {
206206
}
207207

208208
test("string") {
209+
<<<<<<< HEAD
209210
val dataTypeBuilder = new org.apache.spark.sql.catalyst.parser.DataTypeAstBuilder()
210211
val token1 = dataTypeBuilder.visitStringLit(showDbsContext.pattern)
211212
if (token1 != null) {
@@ -221,6 +222,15 @@ class ParserUtilsSuite extends SparkFunSuite {
221222
if (token3 != null) {
222223
assert(string(token3) == "/home/user/db")
223224
}
225+
=======
226+
assert(string(showDbsContext.pattern.stringLiteralValue().STRING_LITERAL()) ==
227+
"identifier_with_wildcards")
228+
assert(string(createDbContext.commentSpec().get(0).stringLit().stringLiteralValue()
229+
.STRING_LITERAL()) == "database_comment")
230+
231+
assert(string(createDbContext.locationSpec.asScala.head.stringLit().stringLiteralValue()
232+
.STRING_LITERAL()) == "/home/user/db")
233+
>>>>>>> d9a53a852b7ef5766390e7ee8408e58ecf579acb
224234
}
225235

226236
test("position") {
@@ -250,8 +260,12 @@ class ParserUtilsSuite extends SparkFunSuite {
250260
val ctx = createDbContext.locationSpec.asScala.head
251261
val current = CurrentOrigin.get
252262
val (location, origin) = withOrigin(ctx) {
263+
<<<<<<< HEAD
253264
(Option(new org.apache.spark.sql.catalyst.parser.DataTypeAstBuilder()
254265
.visitStringLit(ctx.stringLit())).map(string).getOrElse(""), CurrentOrigin.get)
266+
=======
267+
(string(ctx.stringLit().stringLiteralValue().STRING_LITERAL), CurrentOrigin.get)
268+
>>>>>>> d9a53a852b7ef5766390e7ee8408e58ecf579acb
255269
}
256270
assert(location == "/home/user/db")
257271
assert(origin == Origin(Some(3), Some(27)))

0 commit comments

Comments
 (0)