You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/13 05:27:37 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #32141: [MINOR][TEST] Enhance the test instruction of ThriftServerQueryTestSuite

MaxGekk commented on a change in pull request #32141:
URL: https://github.com/apache/spark/pull/32141#discussion_r612139252



##########
File path: sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/ThriftServerQueryTestSuite.scala
##########
@@ -36,16 +36,31 @@ import org.apache.spark.sql.types._
 /**
  * Re-run all the tests in SQLQueryTestSuite via Thrift Server.
  *
+ * Each case is loaded from a file in "spark/sql/core/src/test/resources/sql-tests/inputs".
+ * Each case has a golden result file in "spark/sql/core/src/test/resources/sql-tests/results".
+ *
  * To run the entire test suite:
  * {{{
- *   build/sbt "hive-thriftserver/testOnly *ThriftServerQueryTestSuite" -Phive-thriftserver
+ *   build/sbt -Phive-thriftserver "hive-thriftserver/testOnly *ThriftServerQueryTestSuite"
+ * }}}
+ *
+ * To run a single test file upon change:
+ * {{{
+ *   build/sbt -Phive-thriftserver \
+ *     "hive-thriftserver/testOnly *ThriftServerQueryTestSuite -- -z inline-table.sql"
+ *
  * }}}
  *
  * This test suite won't generate golden files. To re-generate golden files for entire suite, run:
  * {{{
  *   SPARK_GENERATE_GOLDEN_FILES=1 build/sbt "sql/testOnly *SQLQueryTestSuite"
  * }}}
  *
+ * To re-generate golden file for a single test, run:

Review comment:
       Such command can run multiple tests, for example:
   ```
   SPARK_GENERATE_GOLDEN_FILES=1 build/sbt "sql/testOnly *SQLQueryTestSuite -- -z datetime.sql"
   ```
   updates:
   ```
   ./sql/core/src/test/resources/sql-tests/inputs/ansi/datetime.sql
   ./sql/core/src/test/resources/sql-tests/inputs/datetime.sql
   ```




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org