doris-flink-connector
doris-flink-connector copied to clipboard
[Bug]
Search before asking
- [X] 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?
- [X] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
我理解Doirs Schema Not Null是一种约束,约定当前字段非null,如果插入数据为null,说明这是一条错误数据。不应该如你所说,将其转化成默认值。
我也遇到了相同的问题,stream load 写入 json 格式数据的时候,定义为 NOT NULL 的列会报错,但是在导入 parquet 格式文件的时候会自动填充默认值,两种格式的源文件导入语义没对齐。
This PR may help you: https://github.com/apache/doris/pull/20078
I had the same problem.