wangyum commented on a change in pull request #25373: [SPARK-28527][SQL][TEST] 
Directly re-run all the tests in SQLQueryTestSuite via Thrift Server
URL: https://github.com/apache/spark/pull/25373#discussion_r313325845
 
 

 ##########
 File path: 
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/ThriftServerQueryTestSuite.scala
 ##########
 @@ -0,0 +1,359 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.hive.thriftserver
+
+import java.io.File
+import java.sql.{DriverManager, SQLException, Statement, Timestamp}
+import java.util.Locale
+
+import scala.util.{Random, Try}
+import scala.util.control.NonFatal
+
+import org.apache.hadoop.hive.conf.HiveConf.ConfVars
+import org.apache.hive.service.cli.HiveSQLException
+
+import org.apache.spark.sql.{AnalysisException, SQLQueryTestSuite}
+import org.apache.spark.sql.catalyst.util.fileToString
+import org.apache.spark.sql.execution.HiveResult
+import org.apache.spark.sql.internal.SQLConf
+import org.apache.spark.sql.types._
+
+/**
+ * Directly re-run all the tests in SQLQueryTestSuite via Thrift Server
+ *
+ * TODO:
+ *   1. Support UDF testing.
+ *   2. Support DESC command.
+ *   3. Support SHOW command.
+ */
+class ThriftServerQueryTestSuite extends SQLQueryTestSuite {
+
+  private var hiveServer2: HiveThriftServer2 = _
+
+  override def beforeEach(): Unit = {
 
 Review comment:
   The first time is very slow:
   ```
   [info] ThriftServerQueryTestSuite:
   [info] - group-by.sql !!! IGNORED !!!
   Start ThriftServer time: 5599
   [info] - natural-join.sql (8 seconds, 404 milliseconds)
   Start ThriftServer time: 44
   [info] - csv-functions.sql (1 second, 30 milliseconds)
   Start ThriftServer time: 34
   [info] - except.sql (8 seconds, 354 milliseconds)
   Start ThriftServer time: 38
   [info] - string-functions.sql (1 second, 281 milliseconds)
   Start ThriftServer time: 39
   [info] - describe-table-column.sql (2 seconds, 434 milliseconds)
   Start ThriftServer time: 81
   [info] - random.sql (621 milliseconds)
   Start ThriftServer time: 30
   [info] - tablesample-negative.sql (485 milliseconds)
   Start ThriftServer time: 30
   [info] - window.sql (25 seconds, 601 milliseconds)
   Start ThriftServer time: 32
   [info] - join-empty-relation.sql (632 milliseconds)
   Start ThriftServer time: 35
   [info] - null-propagation.sql (310 milliseconds)
   Start ThriftServer time: 33
   [info] - operators.sql (1 second, 683 milliseconds)
   Start ThriftServer time: 33
   [info] - change-column.sql (504 milliseconds)
   Start ThriftServer time: 33
   [info] - count.sql (2 seconds, 125 milliseconds)
   [info] - decimalArithmeticOperations.sql !!! IGNORED !!!
   Start ThriftServer time: 31
   [info] - group-analytics.sql (16 seconds, 295 milliseconds)
   Start ThriftServer time: 34
   [info] - inline-table.sql (430 milliseconds)
   Start ThriftServer time: 29
   [info] - comparator.sql (240 milliseconds)
   Start ThriftServer time: 27
   
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to