hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Homan (JIRA)" <>
Subject [jira] [Updated] (HIVE-2334) DESCRIBE TABLE causes NPE when hive.cli.print.header=true
Date Fri, 05 Aug 2011 01:16:27 GMT


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;
Time taken: 4.013 seconds
hive> set hive.cli.print.header=true;
hive> use default;
Time taken: 0.0090 seconds

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:
>             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:


View raw message