diff options
author | Herman van Hovell <hvanhovell@questtec.nl> | 2016-02-03 12:31:30 -0800 |
---|---|---|
committer | Davies Liu <davies.liu@gmail.com> | 2016-02-03 12:31:30 -0800 |
commit | 9dd2741ebe5f9b5fa0a3b0e9c594d0e94b6226f9 (patch) | |
tree | 944375f52deb2c45463d6b73ad9c14eb2fac4a31 /sql/hive-thriftserver | |
parent | c4feec26eb677bfd3bfac38e5e28eae05279956e (diff) | |
download | spark-9dd2741ebe5f9b5fa0a3b0e9c594d0e94b6226f9.tar.gz spark-9dd2741ebe5f9b5fa0a3b0e9c594d0e94b6226f9.tar.bz2 spark-9dd2741ebe5f9b5fa0a3b0e9c594d0e94b6226f9.zip |
[SPARK-13157] [SQL] Support any kind of input for SQL commands.
The ```SparkSqlLexer``` currently swallows characters which have not been defined in the grammar. This causes problems with SQL commands, such as: ```add jar file:///tmp/ab/TestUDTF.jar```. In this example the `````` is swallowed.
This PR adds an extra Lexer rule to handle such input, and makes a tiny modification to the ```ASTNode```.
cc davies liancheng
Author: Herman van Hovell <hvanhovell@questtec.nl>
Closes #11052 from hvanhovell/SPARK-13157.
Diffstat (limited to 'sql/hive-thriftserver')
-rw-r--r-- | sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala index 9860e40fe8..ba3b26e1b7 100644 --- a/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala +++ b/sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/HiveThriftServer2Suites.scala @@ -488,8 +488,7 @@ class HiveThriftBinaryServerSuite extends HiveThriftJdbcTest { } } - // TODO: enable this - ignore("SPARK-11595 ADD JAR with input path having URL scheme") { + test("SPARK-11595 ADD JAR with input path having URL scheme") { withJdbcStatement { statement => val jarPath = "../hive/src/test/resources/TestUDTF.jar" val jarURL = s"file://${System.getProperty("user.dir")}/$jarPath" @@ -547,8 +546,7 @@ class SingleSessionSuite extends HiveThriftJdbcTest { override protected def extraConf: Seq[String] = "--conf spark.sql.hive.thriftServer.singleSession=true" :: Nil - // TODO: enable this - ignore("test single session") { + test("test single session") { withMultipleConnectionJdbcStatement( { statement => val jarPath = "../hive/src/test/resources/TestUDTF.jar" |