zabetak commented on code in PR #46:
URL: https://github.com/apache/hive-site/pull/46#discussion_r2072954862


##########
content/Development/qtest.md:
##########
@@ -194,3 +194,15 @@ Remote debugging with Query File Test is a potent tool for 
debugging Hive. With
 ```sh
 $ mvn -Pitests -pl itests/qtest -Dmaven.surefire.debug test 
-Dtest=TestMiniLlapLocalCliDriver -Dqfile=alter1.q
 ```
+
+## Tips for Adding New Tests in Hive
+
+Following are a few rules of thumb that should be followed when adding new 
test cases in Hive that require the introduction of new query file(s). Of 
course, these rules should not be applied if they invalidate the purpose of 
your test to begin with. These are generally helpful in keeping the test 
queries concise, minimizing the redundancies where possible, and ensuring that 
cascading failures due to a single test failure do not occur.
+
+* Instead of creating your own data file for loading into a new table, use 
existing data from staged tables like `src`.

Review Comment:
   nit: I like tests that are self-contained and minimal so I am not sure if 
using built-in datasets (especially `src` where the data are pretty cryptic) is 
always a good idea. Anyways this PR just moves around existing content so I am 
fine if it remains as is.



##########
content/docs/latest/home_27362069.md:
##########
@@ -105,27 +104,21 @@ DML ([load/insert/update/delete/merge]({{< ref 
"languagemanual-dml_27362036" >}}
 * [Hive Contributors Meetings]({{< ref 
"development-contributorsmeetings_27362087" >}})
 * [Hive Developer Docs]({{< ref "developerdocs_42568263" >}})
        + [Hive Developer Guide]({{< ref "developerguide_27362074" >}}) ([code 
organization]({{< ref "#code-organization" >}}), [compile and run Hive]({{< ref 
"#compile-and-run-hive" >}}), [unit tests]({{< ref "#unit-tests" >}}), 
[debug]({{< ref "#debug" >}}), [pluggable interfaces]({{< ref 
"#pluggable-interfaces" >}}))
-       + [Hive Developer FAQ]({{< ref "hivedeveloperfaq_27823747" >}}) ([move 
files]({{< ref "#move-files" >}}), [build Hive]({{< ref "#build-hive" >}}), 
[test Hive]({{< ref "#test-hive" >}}), [MiniDriver and Beeline tests]({{< ref 
"minidriver-tests_38571221" >}}))
+       + [Hive Developer FAQ]({{< ref "hivedeveloperfaq_27823747" >}}) ([move 
files]({{< ref "#move-files" >}}), [build Hive]({{< ref "#build-hive" >}}), 
[test Hive]({{< ref "#test-hive" >}})
        + [Plugin Developer Kit]({{< ref "plugindeveloperkit_27820324" >}})
        + [Writing UDTFs]({{< ref "developerguide-udtf_27362086" >}})
        + [Hive APIs Overview]({{< ref "hive-apis-overview_61326349" >}})
 * [Hive Testing Docs]({{< ref "testingdocs_42567126" >}})
        + [FAQ: Testing]({{< ref "#faq:-testing" >}})
        + [Developer Guide: Unit Tests]({{< ref "#developer-guide:-unit-tests" 
>}})
        + [Unit Testing Hive SQL]({{< ref "unit-testing-hive-sql_61328063" >}})
-       + [Unit Test Parallel Execution]({{< ref 
"unit-test-parallel-execution_27833687" >}})
-       + [Tips for Adding New Tests]({{< ref "tipsforaddingnewtests_27362060" 
>}})
-       + [Hive PTest2 Infrastructure]({{< ref 
"hive-ptest2-infrastructure_33295254" >}})
-       + [Hive PreCommit Patch Testing]({{< ref 
"hive-precommit-patch-testing_33295252" >}})
-       + [MiniDriver Tests]({{< ref "minidriver-tests_38571221" >}})
        + [Running Yetus]({{< ref "running-yetus_71012969" >}})
        + [MetaStore API Tests]({{< ref "metastore-api-tests_75958143" >}})
 * [Hive Performance]({{< ref "performance_27362052" >}})
 * [Hive Architecture Overview]({{< ref "design_27362072" >}})
 * [Hive Design Docs]({{< ref "designdocs_27362075" >}}):  [Completed]({{< ref 
"#completed" >}}); [In Progress]({{< ref "#in-progress" >}}); [Proposed]({{< 
ref "#proposed" >}}); [Incomplete, Abandoned, Other]({{< ref 
"#incomplete,-abandoned,-other" >}})
 * [Roadmap/Call to Add More Features]({{< ref "roadmap_27362057" >}})
-* [Full-Text Search over All Hive Resources](http://search-hadoop.com/Hive)
-* [How to edit the website]({{< ref "how-to-edit-the-website_33294834" >}})
+* [GitHub repository of this website](https://github.com/apache/hive-site)

Review Comment:
   nit: we can drop the link altogether. I don't think it is very helpful as is.



##########
content/Development/qtest.md:
##########
@@ -194,3 +194,15 @@ Remote debugging with Query File Test is a potent tool for 
debugging Hive. With
 ```sh
 $ mvn -Pitests -pl itests/qtest -Dmaven.surefire.debug test 
-Dtest=TestMiniLlapLocalCliDriver -Dqfile=alter1.q
 ```
+
+## Tips for Adding New Tests in Hive
+
+Following are a few rules of thumb that should be followed when adding new 
test cases in Hive that require the introduction of new query file(s). Of 
course, these rules should not be applied if they invalidate the purpose of 
your test to begin with. These are generally helpful in keeping the test 
queries concise, minimizing the redundancies where possible, and ensuring that 
cascading failures due to a single test failure do not occur.
+
+* Instead of creating your own data file for loading into a new table, use 
existing data from staged tables like `src`.
+* If your test requires a `SELECT` query, keep it as simple as possible, and 
minimize the number of queries to keep overall test time down; avoid repeating 
scenarios which are already covered by existing tests.
+* When you do need to use a `SELECT` statement, make sure you use the `ORDER 
BY` clause to minimize the chances of spurious diffs due to output order 
differences leading to test failures.
+* Limit your test to one table unless you require multiple tables specifically.
+* Start the query specification with an explicit `DROP TABLE` directive to 
make sure that any upstream test failures that could not clean up do not cause 
your test to fail.
+* End the query specification with explicit `DROP TABLE` directive to drop the 
table(s) you may have created during the course of the test.

Review Comment:
   nit: I think DROP commands are redundant and are handled nicely now by the 
framework.



-- 
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.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to