sercanCyberVision commented on code in PR #6762:
URL: https://github.com/apache/hive/pull/6762#discussion_r3982222960
##########
cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java:
##########
@@ -842,7 +842,7 @@ private CommandProcessorResponse
executeDriver(CliSessionState ss, HiveConf conf
console.printInfo(HiveConf.generateMrDeprecationWarning());
}
- setupLineReader();
+ cli.setupLineReader();
Review Comment:
> any remaining unqualified uses of `reader` elsewhere in
`executeDriver(...)` would still refer to `this.reader` (the outer instance)
and could reintroduce the same NPE.
There was only one occurrence of an unqualified `reader` reference in
`executeDriver()`, and it has been changed as well.
It used to be:
```
while ((line = reader.readLine(curPrompt + "> ")) != null) {
```
and it is now:
```
while ((line = cli.reader.readLine(curPrompt + "> ")) != null) {
```
After applying the fix, I rebuilt the project and verified it with:
```
hive> show tables;
test
Time taken: 1.447 seconds, Fetched: 1 row(s)
hive>
```
FYI @ayushtkn
--
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]