sercanCyberVision commented on code in PR #6762:
URL: https://github.com/apache/hive/pull/6762#discussion_r4006090250


##########
cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java:
##########
@@ -851,7 +851,7 @@ private CommandProcessorResponse 
executeDriver(CliSessionState ss, HiveConf conf
     String curPrompt = prompt + curDB;
     String dbSpaces = spacesForString(curDB);
 
-    while ((line = reader.readLine(curPrompt + "> ")) != null) {
+    while ((line = cli.reader.readLine(curPrompt + "> ")) != null) {

Review Comment:
   @tanishq-chugh, thank you for your review. 
   
   I have added a private `readLine` method to decouple `executeDriver` from 
the underlying `reader`. I also checked the rest of the class for other 
instances of `reader.readLine`, the one in `executeDriver` was the only 
occurrence.
   
   Tested the patch:
   ```
   hive> CREATE TABLE test (id INT);
   Time taken: 1.252 seconds
   hive> SHOW TABLES;
   test
   Time taken: 0.108 seconds, Fetched: 1 row(s)
   hive>
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to