Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-23861

Beeline Output Formats should parse underlying resultset themselves

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Beeline
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            hunterl Hunter Logan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: