hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lerman <>
Subject getting the field types of a query result
Date Sun, 28 Jun 2009 16:07:22 GMT
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!

View raw message