You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Min Zhou <co...@gmail.com> on 2009/06/19 09:18:15 UTC

exception when when calling Driver.getSchema()

Hi guys,

Driver.getSchema() obtains current result's tableDesc and assemble it to a
String. I found if do select all queries on a table contains partitions,  a
null pointer exception will happens.  See SemanticAnalyzer.java:3681: fetch
= new fetchWork(listP, partP, qb.getParseInfo().getOuterQueryLimit());
tableDesc hasn't been created for that fetchWork during the query time.

Here is an example : select * from web_log where dt ='20090619'  ,  where dt
is the parition column of web_log.

Regards,
Min
-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

My profile:
http://www.linkedin.com/in/coderplay
My blog:
http://coderplay.javaeye.com

Re: exception when when calling Driver.getSchema()

Posted by Bill Graham <bi...@gmail.com>.
I was actually just trying to troubleshoot this same issue when I saw your
email. Thanks for pointing this out.

I've opened a JIRA and submitted a patch for this fyi:
https://issues.apache.org/jira/browse/HIVE-568

In the case where the tableDesc is not set on the FetchTask object, I look
for the tableDesc of the first partDesc if there is one. Please comment in
the JIRA if anyone sees a problem with this approach.

thanks,
Bill


On Fri, Jun 19, 2009 at 12:18 AM, Min Zhou <co...@gmail.com> wrote:

> Hi guys,
>
> Driver.getSchema() obtains current result's tableDesc and assemble it to a
> String. I found if do select all queries on a table contains partitions,  a
> null pointer exception will happens.  See SemanticAnalyzer.java:3681: fetch
> = new fetchWork(listP, partP, qb.getParseInfo().getOuterQueryLimit());
> tableDesc hasn't been created for that fetchWork during the query time.
>
> Here is an example : select * from web_log where dt ='20090619'  ,  where
> dt is the parition column of web_log.
>
> Regards,
> Min
> --
> My research interests are distributed systems, parallel computing and
> bytecode based virtual machine.
>
> My profile:
> http://www.linkedin.com/in/coderplay
> My blog:
> http://coderplay.javaeye.com
>