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

[Bug] #136

Open
3 tasks done
victoyzz opened this issue Apr 26, 2023 · 5 comments
Open
3 tasks done

[Bug] #136

victoyzz opened this issue Apr 26, 2023 · 5 comments

Comments

@victoyzz
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

Version

doris ,1.2.4
flink ,1.1.4
flink-doris-connect , 1.1.1

What's Wrong?

flink写doris,报错:Reason: column(xxx) values is null while columns is not nullable

UNIQUE 模型。xxx字段列 :NOT NULL DEFAULT '1' 。已经指定了not null后的默认值。

当插入的字段值为null,为何不生效默认值?而是直接报错了。

What You Expected?

当插入的字段值为null,为何不生效默认值?而是直接报错了。
期望: 不报错,且not null后指定的默认值生效。

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@big-doudou
Copy link

big-doudou commented May 9, 2023

我理解Doirs Schema Not Null是一种约束,约定当前字段非null,如果插入数据为null,说明这是一条错误数据。不应该如你所说,将其转化成默认值。

@DarvenDuan
Copy link

我也遇到了相同的问题,stream load 写入 json 格式数据的时候,定义为 NOT NULL 的列会报错,但是在导入 parquet 格式文件的时候会自动填充默认值,两种格式的源文件导入语义没对齐。

@DarvenDuan
Copy link

This PR may help you: apache/doris#20078

@zhouhaihong
Copy link

I had the same problem.

@JNSimba
Copy link
Member

JNSimba commented Jul 11, 2024

Does this pr apache/doris#20624 solve your problem?

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

No branches or pull requests

5 participants