Skip to content

feat: add Iceberg v3 type definitions#752

Open
zhjwpku wants to merge 3 commits into
apache:mainfrom
zhjwpku:add-iceberg-v3-types
Open

feat: add Iceberg v3 type definitions#752
zhjwpku wants to merge 3 commits into
apache:mainfrom
zhjwpku:add-iceberg-v3-types

Conversation

@zhjwpku

@zhjwpku zhjwpku commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Introduce the Iceberg v3 types (variant, geometry, geography), including their schema/JSON serialization and type-system integration (visitors, schema projection, etc.).

Reading and writing data of these types is not implemented yet: conversion to/from Arrow, Avro, and Parquet returns an error, as do identity transform binding and scalar validation for them.

@zhjwpku zhjwpku force-pushed the add-iceberg-v3-types branch from 1c1f95c to 00c7860 Compare June 16, 2026 16:54
Introduce the Iceberg v3 types (variant, geometry, geography), including
their schema/JSON serialization and type-system integration (visitors,
schema projection, etc.).

Reading and writing data of these types is not implemented yet: conversion
to/from Arrow, Avro, and Parquet returns an error, as do identity transform
binding and scalar validation for them.
@zhjwpku zhjwpku force-pushed the add-iceberg-v3-types branch from 00c7860 to 2b09f55 Compare June 16, 2026 16:54
Comment thread src/iceberg/json_serde.cc Outdated

@WZhuo WZhuo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread src/iceberg/type.h Outdated
explicit GeometryType(std::string crs);
~GeometryType() override = default;

[[nodiscard]] std::string_view crs() const;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[[nodiscard]] std::string_view crs() const;
std::string_view crs() const;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I removed all remaining [[nodiscard]] annotations in type.h

Comment thread src/iceberg/type.h Outdated
bool Equals(const Type& other) const override;

private:
std::optional<std::string> crs_;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty thing is enough to represent a missing crs.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, changed to string.

Comment thread src/iceberg/type.h Outdated
Comment thread src/iceberg/type.h Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants