You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to propose to add Variant type to Iceberg data types.
Variant data types allow for the efficient binary encoding of dynamic semi-structured data such as JSON, Avro,Parquet, etc. By encoding semi-structured data as a variant column, we retain the flexibility of the source data, while allowing query engines to more efficiently operate on the data.
With the support of Variant type, such data can be encoded in an efficient binary representation internally for better performance. Without that, we need to parse the data in its format inefficiently.
This will allow the following use cases:
Create an Iceberg table with a Variant column CREATE OR REPLACE TABLE car_sales(record Variant);
Insert semi-structured data into the Variant column INSERT INTO car_sales SELECT PARSE_JSON(<json_string>)
Query against the semi-structured data SELECT VARIANT_GET(record, '$.dealer.ship', 'string') FROM car_sales
Hi folks. We are actively working on the Variant support. I have made a POC with Spark implementation and currently we are working on individual PRs to move forward. The full Variant support includes part1 - basic Variant type encoding/decoding (without shredding) and part2 - Variant with shredding. We will get part1 to work soon. The spec for Part2 is getting finalized and we will work on the design.
Reacted by Xu Bai, Manoj Agarwal, Oshri Mahlev, Jack Naglieri, ismail simsek, Cornel Creanga, Sreeram Garlapati, Adrien ARCURI - Betclic, Daseul Ryu, Viacheslav Inozemtsev and 1 more
Reacted by Imtiaz Ahmed
Reacted by ismail simsek, Jorge Valhondo Rama, Anton Berlinsky and Sherm4nLC
@aihuaxu Will this also work for protobuf encoded columns? I have a dataset with event_bytes | event_name
101010100 | e1 101010100 | e2
That shouldn't work. Variant has its own specific encoding. We need to store the value in a Variant column which will convert and store in its specific binary format. Protobuf encoding is stored differently.
@aihuaxu Hi, does Spark support pushing the variant_get function down to Iceberg, so that it avoids reading the entire variant column and instead only reads its subcolumn (in shredding mode)? Or will this be implemented later?
@aihuaxu Hi, does Spark support pushing the variant_get function down to Iceberg, so that it avoids reading the entire variant column and instead only reads its subcolumn (in shredding mode)? Or will this be implemented later?
@eldenmoon Sorry for the late reply. We need some work to support such pushdown to Iceberg. That will be implemented later.
@aihuaxu Hi, does Spark support pushing the variant_get function down to Iceberg, so that it avoids reading the entire variant column and instead only reads its subcolumn (in shredding mode)? Or will this be implemented later?
@eldenmoon Sorry for the late reply. We need some work to support such pushdown to Iceberg. That will be implemented later.
Any updates on release date or time line @aihuaxu ?
Reacted by Manoj Agarwal, lihangyu and Ahn, JongMoon
Hi there Varient feature has been released please check out example here
Learn how to use Variant Feature in Iceberg 1.10.0 V3 with PySpark Code Example
@aihuaxu Hi, does Spark support pushing the variant_get function down to Iceberg, so that it avoids reading the entire variant column and instead only reads its subcolumn (in shredding mode)? Or will this be implemented later?
@eldenmoon Sorry for the late reply. We need some work to support such pushdown to Iceberg. That will be implemented later.
Any updates on release date or time line @aihuaxu ?
To have the pushdown to Iceberg from Spark, it needs apache/spark#52578 which will be in Spark 4.1.0 release. We are waiting for the release.
in #15628/#15629 I'm adding benchmarks for variant read (plus something similar in parquet).
The current numbers (see the issue) show a major performance penalty doing simple queries over shedded variants -things get about twice as slow as unshedded. That hints to me that there's reconstruction of the variant struct going on before query execution
Hi everyone, I've seen the requests on this issue and others to help track the Variant progress better. To that end, I've proposed to set up some time on a monthly cadence to sync on all things Variant.
To keep things tracked, I've created a Community document that covers the current status, tracking of issues and PR, and the benchmark results from the community. Please take a look here - Variant Community Document. If you are interested in Variant, please chime in on the mailing list thread: https://lists.apache.org/thread/f8l27lr55nlrdg4qwno29r796d4v2p8l. Thanks.
Variant update ahead of the 1.12 release, with the PRs collected here so this issue is easy to follow.
You can define a VARIANT column, write it with Spark, Flink, and Kafka Connect, and read it back either row-by-row or with the Spark vectorized reader. Parquet, Avro, and ORC are supported, along with metrics-based row-group filtering. Shredded writes work in Spark and Flink.
Current work: type uniformity for shredding, shredded-read extraction and predicate pushdown, and wider engine and Record/Data coverage.
Merged
Spec - #10831 variant type · #12658 lower/upper bounds · #16836 type classification & primitive scoping
Thanks @trevorpburke. I'm hoping soon once some of the correctness fixes are in. I keep the dev list thread of the release up to date if you need to look at what is pending.
Activity
soumilshah1995 commentedon Oct 1, 2024
+1
aihazm commentedon Oct 25, 2024
+1
soumilshah1995 commentedon Oct 29, 2024
Any ideas on release dates ?
NurFaizin commentedon Nov 4, 2024
+1
tmnd1991 commentedon Nov 22, 2024
+1
soumilshah1995 commentedon Nov 29, 2024
Any updates on release date for Varient Feature ?
aihuaxu commentedon Dec 2, 2024
Hi folks. We are actively working on the Variant support. I have made a POC with Spark implementation and currently we are working on individual PRs to move forward. The full Variant support includes part1 - basic Variant type encoding/decoding (without shredding) and part2 - Variant with shredding. We will get part1 to work soon. The spec for Part2 is getting finalized and we will work on the design.
stym06 commentedon Jan 6, 2025
@aihuaxu Will this also work for protobuf encoded columns? I have a dataset with
event_bytes | event_name
101010100 | e1
101010100 | e2
aihuaxu commentedon Jan 6, 2025
That shouldn't work. Variant has its own specific encoding. We need to store the value in a Variant column which will convert and store in its specific binary format. Protobuf encoding is stored differently.
aihuaxu commentedon Jan 30, 2025
@RussellSpitzer Can you help reopen this? It's automatically closed when one task #10831 (#10831) mentioned "fixed this issue" . Thanks.
desairavi1101 commentedon Feb 2, 2025
+1
11 remaining items
eldenmoon commentedon Sep 5, 2025
@aihuaxu Hi, does Spark support pushing the
variant_getfunction down to Iceberg, so that it avoids reading the entire variant column and instead only reads its subcolumn (in shredding mode)? Or will this be implemented later?aihuaxu commentedon Sep 12, 2025
@eldenmoon Sorry for the late reply. We need some work to support such pushdown to Iceberg. That will be implemented later.
soumilshah1995 commentedon Sep 12, 2025
Any updates on release date or time line @aihuaxu ?
soumilshah1995 commentedon Sep 20, 2025
Hi there Varient feature has been released please check out example here
Learn how to use Variant Feature in Iceberg 1.10.0 V3 with PySpark Code Example
https://medium.com/@shahsoumil519/learn-how-to-use-variant-feature-in-iceberg-1-10-0-v3-with-pyspark-code-example-2c2ae84829cf
aihuaxu commentedon Nov 2, 2025
To have the pushdown to Iceberg from Spark, it needs apache/spark#52578 which will be in Spark 4.1.0 release. We are waiting for the release.
qlong commentedon Feb 28, 2026
Added PRs to support file level skipping based on variant filter
ndcuong869 commentedon Mar 1, 2026
The feature is important for my product. Any milestones to release?
steveloughran commentedon Mar 25, 2026
in #15628/#15629 I'm adding benchmarks for variant read (plus something similar in parquet).
The current numbers (see the issue) show a major performance penalty doing simple queries over shedded variants -things get about twice as slow as unshedded. That hints to me that there's reconstruction of the variant struct going on before query execution
nssalian commentedon Apr 19, 2026
Hi everyone, I've seen the requests on this issue and others to help track the Variant progress better. To that end, I've proposed to set up some time on a monthly cadence to sync on all things Variant.
To keep things tracked, I've created a Community document that covers the current status, tracking of issues and PR, and the benchmark results from the community. Please take a look here - Variant Community Document. If you are interested in Variant, please chime in on the mailing list thread: https://lists.apache.org/thread/f8l27lr55nlrdg4qwno29r796d4v2p8l. Thanks.
steveloughran commentedon Apr 30, 2026
I"ve put up an issue to track what's needed for shredded variants in iceberg, spark and parquet #16172
dantrofm commentedon Jul 15, 2026
What about Kafka Connect auto-create / schema inference: Debezium io.debezium.data.Json (PG json & jsonb) -> Iceberg VariantType ?
nssalian commentedon Aug 12, 2026
Variant update ahead of the 1.12 release, with the PRs collected here so this issue is easy to follow.
You can define a
VARIANTcolumn, write it with Spark, Flink, and Kafka Connect, and read it back either row-by-row or with the Spark vectorized reader. Parquet, Avro, and ORC are supported, along with metrics-based row-group filtering. Shredded writes work in Spark and Flink.Current work: type uniformity for shredding, shredded-read extraction and predicate pushdown, and wider engine and Record/Data coverage.
Merged
Spec - #10831 variant type · #12658 lower/upper bounds · #16836 type classification & primitive scoping
Type + binary encoding (API / Core)
toString, extra types: #11415, #12138, #12531, #12317, #12682 (timestamp_ns/time/UUID), #13151, #13284 (short string), #12835 (JSON path)Parquet
Avro / ORC - #12238, #12457 (Avro) · #12567 (ORC generics)
Engines
REST / OpenAPI - #17256 (VariantType in spec) · #17500 (RCK coverage)
Docs - #13828
Shredding writes - #17424 (type uniformity) · #17520 (Data + Kafka Connect)
Active / open
Shredded reads / pushdown - #16714 + #16715 (Spark extraction) · #15385 (
variant_getfile skipping) · #15384 (extract + manifest bounds) · #17431 (ordered predicates)Engines / tooling - #16735 (Hive nested VARIANT) · #17617 (file-format TCK) · #17553 (partial/multi-column tests) · #15629 (JMH benchmarks) · #17537 (blog post)
trevorpburke commentedon Sep 3, 2026
hi @nssalian , super excited to see the progress with Variant type support esp with Kafka Connect!
do you know if there's a rough timeline for 1.12 release?
nssalian commentedon Sep 3, 2026
Thanks @trevorpburke. I'm hoping soon once some of the correctness fixes are in. I keep the dev list thread of the release up to date if you need to look at what is pending.