You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Hunter Logan (Jira)" <ji...@apache.org> on 2020/07/16 14:21:00 UTC

[jira] [Created] (HIVE-23861) Beeline Output Formats should parse underlying resultset themselves

Hunter Logan created HIVE-23861:
-----------------------------------

             Summary: Beeline Output Formats should parse underlying resultset themselves
                 Key: HIVE-23861
                 URL: https://issues.apache.org/jira/browse/HIVE-23861
             Project: Hive
          Issue Type: Improvement
          Components: Beeline
            Reporter: Hunter Logan


Currently *Outputformat types in Beeline are passed a Rows object. This rows object parses a resultset ([https://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html]) into strings and stored in Rows.values. The *Outputformat types do not have access to the underlying resultset just the values array and the metadata.

 

The benefit to this current design is that every output format is forced to output the data the identically while only changing the aesthetics. The downside to this is that it restricts _actually_ marshaling the data into a new type. For example Outputformats can't support an SQL Array type because they have no way to find the types within the Array, so Arrays are printed as a string, e.g. "["1","2"]"

 

I am proposing that Outputformats be refactored to be passed the resultset directly. For starters this allows us to add support for Arrays but also allows for Outputformats that actually output the results into a more useable format, e.g. AvroOutputformat, ParquetOutputformat.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)