HIVE-29770: Iceberg: Return VARIANT values as JSON over the HS2 Thrift protocol - #6644
HIVE-29770: Iceberg: Return VARIANT values as JSON over the HS2 Thrift protocol#6644deniskuzZ wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Should the new type get a new version? Note that I don't understand how this client interface versioning works.
| (1, parse_json('{"name": "John", "age": 30}')), | ||
| (2, parse_json('[1, 2, 3]')), | ||
| (3, parse_json('"plain string"')), | ||
| (4, parse_json('42')); |
There was a problem hiding this comment.
Can Hive create VARIANTs from other types?
An interesting case is BINARY. Impala and Trino base64 encodes it, but you can't just create it by parsing JSON
There was a problem hiding this comment.
Hive can only create variants from JSON text (parse_json), so binary variants can't be authored in Hive SQL, but Hive fully understands them on the read side, and renders them exactly the way Trino does (base64).
parse_json is the only variant constructor Hive registers. It's the same-named, same-semantics function as Spark's. There is no CAST(x AS VARIANT) in Hive yet
|



What changes were proposed in this pull request?
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?