Skip to content

Schema data type parsing needs hardening #3229

Description

@dannycjones

Apache Iceberg Rust version

main

Describe the bug

Today, the data type parsing can parse some really weird combinations such as decimal(5, 8)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))).

This is not a big issue, but I think it would make more sense for us to parse a stricter subset - not overly strict, but one that is predictable.

To Reproduce

No response

Expected behavior

We should reject types that contain additional ) or otherwise appears malformed.

I'd recommend we adopt a regex pattern, similar to iceberg-go. https://github.com/apache/iceberg-go/blob/8832cf696b5cc2a54767b5f2fa4c06b138c04495/types.go#L35-L40

Willingness to contribute

I can contribute a fix for this bug independently

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions