[ https://issues.apache.org/jira/browse/HIVE-2334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jakob Homan updated HIVE-2334: ------------------------------ Attachment: h2334.patch Patch to fix issue. The problem was that some commands, such as {{use default}} do not have an associated schema with them from the query processor, but this is expected in the header printing code. It's questionable if the QP should return a schema object with two null fields, but that should be addressed in another issue. After patch: {noformat}hive> use default; OK Time taken: 4.013 seconds hive> set hive.cli.print.header=true; hive> use default; OK Time taken: 0.0090 seconds hive>{noformat} The actual fix is simple, but a bit of refactoring was necessary to test it. I normally wouldn't want to include such refactoring in a bug fix, but this class is ripe for it and the refactorings are a good first step. The check this via an actual unit test, mockito is introduced, as was also the case in HIVE-2171; whichever goes in last will need to be updated to remove the new library. The patch is on trunk. I can generate one for 7.1 if requested. > DESCRIBE TABLE causes NPE when hive.cli.print.header=true > --------------------------------------------------------- > > Key: HIVE-2334 > URL: https://issues.apache.org/jira/browse/HIVE-2334 > Project: Hive > Issue Type: Bug > Components: CLI > Affects Versions: 0.7.1 > Reporter: Carl Steinbach > Assignee: Jakob Homan > Attachments: h2334.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira