zabetak commented on code in PR #5919:
URL: https://github.com/apache/hive/pull/5919#discussion_r2200152669


##########
itests/util/src/main/java/org/apache/hadoop/hive/ql/qoption/QTestDatabaseHandler.java:
##########
@@ -27,20 +27,18 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.nio.file.Files;
-import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.EnumMap;
-import java.util.Map;
+import java.util.List;
 
 /**
  * An option handler for spinning (resp. stopping) databases before (resp. 
after) running a test.
  *
- * Syntax: qt:database:DatabaseType:path_to_init_script
- *
- * The database type ({@link DatabaseType}) is obligatory argument. The 
initialization script can be omitted.
+ * Syntax: qt:database:DatabaseType:databaseName:path_to_init_script

Review Comment:
   This will make the option parsing trickier and maybe it's not worth it given 
that most devs will copy-paste from one file to another.
   
   For the record, I also considered using commons-cli and 
[Options](https://github.com/apache/commons-cli/blob/e32c382354a54f3a719848180a480c3569cdd5b7/src/main/java/org/apache/commons/cli/Options.java)
 to allow the following syntax:
   ```
   qt:database:--type mysql --name qdb --script q_test_author_book_tables.sql
   qt:database:-t mysql -n qdb -s q_test_author_book_tables.sql
   ```
   But it felt a bit of an overkill especially since `databaseType` and 
`databaseName` are mandatory args.
   
   If the rest of the changes in this PR look good how about merging this 
(since tests are green) and following up with another ticket if you feel that 
its worth it?



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