Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: specify a minimum length for the options of enum args #642

Merged
merged 2 commits into from
May 23, 2024

Conversation

mbrobbel
Copy link
Member

@mbrobbel mbrobbel commented May 21, 2024

This came up in a discussion on a substrait-rs PR: it doesn't make sense for the options field of enum args to be empty. This PR modifies the schema to state that the options array of enum args should be non-empty.

I recommend reviewers to take a look at the first commit to see what this PR changes, the second commit is applying auto-formatting and moving the variants of oneOf to reference other definitions, and adding a def for enum_options.

This is a breaking change, because extensions with empty options array are no longer considered valid.

Copy link
Member

@westonpace westonpace left a comment

Choose a reason for hiding this comment

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

Makes sense to me

@westonpace
Copy link
Member

I also don't know if you need to call it a breaking change. I would say any extension function with an empty options array was already invalid, we just weren't checking it for it.

@mbrobbel mbrobbel changed the title fix!: specify a minimum length for the options of enum args fix: specify a minimum length for the options of enum args May 22, 2024
@mbrobbel mbrobbel merged commit 8e65af5 into substrait-io:main May 23, 2024
16 of 17 checks passed
@mbrobbel mbrobbel deleted the enum-arg-options branch May 23, 2024 07:30
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.

2 participants