Skip to content

Spark: Add unknown type support to Spark 3.4 and 3.5#16066

Open
Kurtiscwright wants to merge 3 commits intoapache:mainfrom
Kurtiscwright:spark-3x-unknown-type-support
Open

Spark: Add unknown type support to Spark 3.4 and 3.5#16066
Kurtiscwright wants to merge 3 commits intoapache:mainfrom
Kurtiscwright:spark-3x-unknown-type-support

Conversation

@Kurtiscwright
Copy link
Copy Markdown
Contributor

Spark has supported null data types since 2.x. Current Iceberg implementation doesn't allow Unknown support in Spark 3.4 or 3.5. Adding support to allow usage of Unknown in Iceberg environments relaying on Spark 3.x (AWS EMR).

Kurtis Wright and others added 3 commits April 15, 2026 17:59
Map Iceberg's UnknownType to Spark's NullType in both directions:
- TypeToSparkType: UNKNOWN -> NullType (Iceberg to Spark)
- SparkTypeToType: NullType -> UnknownType (Spark to Iceberg)

This aligns Spark 3.x with the existing Spark 4.x behavior and
allows reading v3 tables with unknown-typed columns without throwing
UnsupportedOperationException. Spark has supported NullType since 2.x.
Map Iceberg's UnknownType to Spark's NullType in both directions:
- TypeToSparkType: UNKNOWN -> NullType (Iceberg to Spark)
- SparkTypeToType: NullType -> UnknownType (Spark to Iceberg)

This aligns Spark 3.x with the existing Spark 4.x behavior and
allows reading v3 tables with unknown-typed columns without throwing
UnsupportedOperationException. Spark has supported NullType since 2.x.
@github-actions github-actions Bot added the spark label Apr 20, 2026
@nastra
Copy link
Copy Markdown
Contributor

nastra commented Apr 21, 2026

This seems to be a backport of #13445. In that case we should backport this cleanly with all the tests as well

@Kurtiscwright
Copy link
Copy Markdown
Contributor Author

Kurtiscwright commented Apr 21, 2026

This seems to be a backport of #13445. In that case we should backport this cleanly with all the tests as well

Thank you for the review. I wasn't sure if backport was the correct framing in this instance, but its correct that its an extension of PR #13445. I will expand the PR to cover the same depth of unit tests as 13445 in a follow up commit along with fixing failing CI checks.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants