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

[Feature] Support default values for specified fields #5023

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidyuan1223
Copy link

… string type)

Purpose

Linked issue: close #5015

paimon spark support default value for specified fields.(Current only string type)
(Testing, not need check)

Tests

API and Format

Documentation

@Zouxxyy
Copy link
Contributor

Zouxxyy commented Feb 7, 2025

Thanks for the implementation, We hope its final form refers to https://issues.apache.org/jira/browse/SPARK-38334:

  1. Allow table creation using Spark's default value syntax, while also saving it in paimon metadata format to facilitate recognition by other clients.
  2. Refer to Spark's own implementation of default values as much as possible.

// 3. set default value for null
defaultValueAssigner.getDefaultValues.forEach(
(fieldName, defaultValue) => {
// 使用 isNull 来检查是否为 null 值
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not use Chinese

@davidyuan1223
Copy link
Author

Thanks for the implementation, We hope its final form refers to https://issues.apache.org/jira/browse/SPARK-38334:

  1. Allow table creation using Spark's default value syntax, while also saving it in paimon metadata format to facilitate recognition by other clients.
  2. Refer to Spark's own implementation of default values as much as possible.

lgtm, i will try to implement this

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.

[Feature] Support default values for specified fields.
2 participants