Taras Bobrovytsky has posted comments on this change. ( http://gerrit.cloudera.org:8080/9927 )
Change subject: IMPALA-6805: Show current database in Impala shell prompt ...................................................................... Patch Set 4: (3 comments) http://gerrit.cloudera.org:8080/#/c/9927/4/shell/impala_shell.py File shell/impala_shell.py: http://gerrit.cloudera.org:8080/#/c/9927/4/shell/impala_shell.py@781 PS4, Line 781: db=self.current_db if self.current_db else ImpalaShell.DEFAULT_DB) At this point we don't know if current_db exists or not. I think we should always set db to ImpalaShell.DEFAULT_DB here. It will get updated later. http://gerrit.cloudera.org:8080/#/c/9927/4/shell/impala_shell.py@1148 PS4, Line 1148: args Why not args.strip() here? http://gerrit.cloudera.org:8080/#/c/9927/4/shell/impala_shell.py@1156 PS4, Line 1156: if args.strip('`') == self.current_db: Make this an "elif". Also, prompt does not need to be updated because of my first comment. It's a good idea to set self.current_db = None here. -- To view, visit http://gerrit.cloudera.org:8080/9927 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ifb0ae58507321e426e5f0f16518671420974a3fc Gerrit-Change-Number: 9927 Gerrit-PatchSet: 4 Gerrit-Owner: Fredy Wijaya <[email protected]> Gerrit-Reviewer: David Knupp <[email protected]> Gerrit-Reviewer: Fredy Wijaya <[email protected]> Gerrit-Reviewer: Taras Bobrovytsky <[email protected]> Gerrit-Comment-Date: Thu, 05 Apr 2018 01:33:49 +0000 Gerrit-HasComments: Yes
