doris-flink-connector icon indicating copy to clipboard operation
doris-flink-connector copied to clipboard

[Bug]

Open victoyzz opened this issue 1 year ago • 5 comments

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

victoyzz avatar Apr 26 '23 03:04 victoyzz

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

big-doudou avatar May 09 '23 09:05 big-doudou

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

DarvenDuan avatar May 15 '23 02:05 DarvenDuan

This PR may help you: https://github.com/apache/doris/pull/20078

DarvenDuan avatar May 26 '23 03:05 DarvenDuan

I had the same problem.

zhouhaihong avatar Jun 14 '23 09:06 zhouhaihong