Skip to content

[FEATURE] Native scan support for VariantType columns (Iceberg + Spark 4.0) #4295

Open

Description

@Shekharrajak

What is the problem the feature request solves?

Today, Comet falls back to JVM Spark for any query touching a VariantType column. This eliminates Comet's acceleration for the entire query, including unrelated operators that could otherwise run natively. This issue tracks adding native execution for Variant column scans, both for plain Parquet and Iceberg tables, by consuming new Variant primitives from arrow-rs and iceberg-rust.

Describe the potential solution

spark/src/main/scala/org/apache/comet/rules/CometScanRule.scala (line 729):

case s: StructType if isVariantStruct(s) =>
  fallbackReasons +=
    s"Unsupported $name of type VariantType (shredded; not supported by $scanImpl scan)"
  false

Additional context

Follow-ups

• Comet support for parse_json / to_variant (write side)
• Comet support for schema_of_variant (metadata operation)
• Predicate pushdown on variant_get(...) = literal into Parquet's column index
• Variant in shuffle / spill paths (separate issue)

Activity

  1. Shekharrajak commented on May 12, 2026

    @Shekharrajak
    ContributorAuthor
  2. added
    priority:mediumFunctional bugs, performance regressions, broken features
    area:scanParquet scan / data reading
    native_iceberg_compatSpecific to native_iceberg_compat scan type
    and removed on May 18, 2026
  3. added
    priority:highCrashes, panics, segfaults, major functional breakage
    and removed
    priority:mediumFunctional bugs, performance regressions, broken features
    on May 18, 2026
  4. kazuyukitanimura commented on May 18, 2026

    @kazuyukitanimura
    Contributor

    Changed the priority to high because this is an important feature

  5. peterxcli commented on Aug 19, 2026

    @peterxcli
    Member

    I would like to implement first step of this - basic native VARIANT projection for ordinary Parquet (protobuf/type identity, Arrow-to-Spark bridge, unshredding/reordering, and Spark VariantType vectors).

  6. peterxcli commented on Aug 19, 2026

    @peterxcli
    Member

    take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:scanParquet scan / data readingenhancementNew feature or requestpriority:highCrashes, panics, segfaults, major functional breakagespark 4.0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions