[ 
https://issues.apache.org/jira/browse/HIVE-29184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Denys Kuzmenko updated HIVE-29184:
----------------------------------
    Description: 
Introduces the Variant data structure to represent semi-structured data and a 
new SQL type variant, with initial Hive support for reading and writing Variant 
data in Iceberg tables. 

{code:java}
class Variant {
    private final byte[] value;
    private final byte[] metadata;
}
{code}


Hive Deserializer converts Iceberg Variants into Hive Variants during access.

Ref PR:




  was:
Introduces the Variant data structure to represent semi-structured data and a 
new SQL type variant


{code:java}
class BinaryVariant implements Variant {

    private final byte[] value;
    private final byte[] metadata;
    // The variant value doesn't use the whole `value` binary, but starts from 
its `pos` index and
    // spans a size of `valueSize(value, pos)`. This design avoids frequent 
copies of the value
    // binary when reading a sub-variant in the array/object element.
    private final int pos;
}
{code}



> Add basic Variant Type support in Hive
> --------------------------------------
>
>                 Key: HIVE-29184
>                 URL: https://issues.apache.org/jira/browse/HIVE-29184
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Denys Kuzmenko
>            Priority: Major
>
> Introduces the Variant data structure to represent semi-structured data and a 
> new SQL type variant, with initial Hive support for reading and writing 
> Variant data in Iceberg tables. 
> {code:java}
> class Variant {
>     private final byte[] value;
>     private final byte[] metadata;
> }
> {code}
> Hive Deserializer converts Iceberg Variants into Hive Variants during access.
> Ref PR:



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to