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

[spark] check column nullability when write #3842

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

YannByron
Copy link
Contributor

Purpose

Linked issue: close #xxx

Tests

API and Format

Documentation

@Zouxxyy Zouxxyy self-requested a review July 30, 2024 06:04
public static final ConfigOption<Boolean> IGNORE_NULLABLE_CHECK =
key("write.check.ignoreNullability")
.booleanType()
.defaultValue(false)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just be true?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to have this check by default to guarantee the nullability consistency.

And, Delta has constraint feature (eg: NOT NULL) which can check the incoming data when write. When paimon has this similar feature, we can remove this config and do not check nullability any more.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this option affect compilation? I thinking about checking for null directly at runtime, but checking at compile time is too difficult to use.

@YannByron YannByron changed the title [spark] support to ignore the check for schema nullability when write [spark] check column nullability when write Jul 30, 2024
Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@JingsongLi JingsongLi merged commit 6435dd2 into apache:master Jul 30, 2024
8 of 9 checks passed
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