Skip to content

Spec: Add support for default expression values#16777

Draft
danielcweeks wants to merge 1 commit into
apache:mainfrom
danielcweeks:default-expressions
Draft

Spec: Add support for default expression values#16777
danielcweeks wants to merge 1 commit into
apache:mainfrom
danielcweeks:default-expressions

Conversation

@danielcweeks

Copy link
Copy Markdown
Contributor

This PR adds support for value expressions in default values.

See proposal here

@github-actions github-actions Bot added the Specification Issues that may introduce spec changes. label Jun 11, 2026
@danielcweeks danielcweeks marked this pull request as draft June 11, 2026 15:39
Comment thread format/spec.md

The `initial-default` must always be a constant (a single value); it is not allowed to be a function application. A literal is itself a value expression, so existing `write-default` values remain valid value expressions. In format version 3, both `initial-default` and `write-default` must be constants.

All columns of `unknown`, `variant`, `geometry`, and `geography` types must default to null. Non-null `initial-default` or `write-default` values, including value expressions, are invalid.

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.

What is the rationale? Is it to contain scope or is there some other reason?

Comment thread format/spec.md

Struct evolution requires the following rules for default values:

* The `initial-default` must be set when a field is added and cannot change

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.

Why did we remove this? Is this captured somewhere else?

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

Labels

Specification Issues that may introduce spec changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants