If I understanding correctly, I think Prasad means is that the type info of
each column is stored in Hive metadata. And you can fetch that information
by HiveServer or JDBC client (and you need to set up a remote hive
metaserver).

Yongqiang

On 09-6-29 下午6:42, "Min Zhou" <[email protected]> wrote:

> Hi,
> 
> I've came across the same problem when developing jdbc for
> hive(https://issues.apache.org/jira/browse/HIVE-576). it had nothing to do
> with HiveServer and jdbc. I thought currently there is no? good way solving
> it. SenmanticAnalyzer needs to get the result's type returned by udf/udaf for
> building the schema you mentioned. we should also consider the user defined
> type .
> 
> Regards,
> Min
> 
> On Mon, Jun 29, 2009 at 1:53 AM, Prasad Chakka <[email protected]> wrote:
>> I think you need to try using HiveServer or a JDBC client.
>> 
>> 
>> 
>> From: David Lerman <[email protected] <http://[email protected]> >
>> Reply-To: <[email protected] <http://[email protected]> >
>> Date: Sun, 28 Jun 2009 09:07:22 -0700
>> To: <[email protected] <http://[email protected]> >
>> Subject: getting the field types of a query result
>> 
>> 
>> I'm trying to build a tool which runs a query and writes the results into an
>> automatically generated Hive table. ??It's all very straightforward, except
>> that I can't find a good way to determine the type of the results in order
>> to create the table. ?For example, if someone runs "select intField,
>> stringField, sum(intField) from ...", I'd like to automatically create a
>> Hive table with an int column, a string column, and an int column and then
>> do a load into that table. ?Driver.getSchema looks promising but returns
>> strings for all three columns ("struct result { string intField, string
>> stringField, string _c2}"). ?Any suggestions? ?Thanks!
>> 
>> 
>> 
>> 

Reply via email to