kgyrtkirk commented on a change in pull request #543: HIVE-21292: Break up 
DDLTask 1 - extract Database related operations
URL: https://github.com/apache/hive/pull/543#discussion_r259296712
 
 

 ##########
 File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/ddl/database/SwitchDatabaseDesc.java
 ##########
 @@ -16,37 +16,34 @@
  * limitations under the License.
  */
 
-package org.apache.hadoop.hive.ql.plan;
+package org.apache.hadoop.hive.ql.exec.ddl.database;
 
 import java.io.Serializable;
-import org.apache.hadoop.hive.ql.plan.Explain.Level;
 
+import org.apache.hadoop.hive.ql.exec.ddl.DDLDesc;
+import org.apache.hadoop.hive.ql.exec.ddl.DDLTask2;
+import org.apache.hadoop.hive.ql.plan.Explain;
+import org.apache.hadoop.hive.ql.plan.Explain.Level;
 
 /**
- * SwitchDatabaseDesc.
- *
+ * DDL task description for SWITCH DATABASE commands.
 
 Review comment:
   `SWITCH DATABASE` :)
   I'm not aware if that's a valid statment  - is it? :)
   I usually use `USE db1` ; can we rename things around here to something like 
`UseDatabaseDesc` ?
   
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Create/Drop/Alter/UseDatabase
   
   according to:
   ```
   $ git grep -i switch|grep -i database|grep -v HOOK:|grep -v java:|grep -v 
q.out|grep -v js:|less
   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g:TOK_SWITCHDATABASE;
   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g:    | 
switchDatabaseStatement
   
ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g:switchDatabaseStatement
   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g:@init { 
pushMsg("switch database statement", state); }
   ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g:    -> 
^(TOK_SWITCHDATABASE identifier)
   ql/src/test/queries/clientnegative/database_switch_does_not_exist.q:-- Try 
to switch to a database that does not exist
   ```
   "switchdatabase" is also the keyword in the `HiveParser`

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


With regards,
Apache Git Services

Reply via email to