flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timo Walther <twal...@apache.org>
Subject Re: primitiveDefaultValue in CodeGenUtils in Table API
Date Wed, 29 Jun 2016 07:28:49 GMT
Hi Cody,

default values are needed in cases where NULL values are not supported. 
This happens if the null check is disabled in TableConfig for efficiency 
reasons. Using 0 to DataType.MAX_VALUE for numeric types and -1 as a 
NULL equivalent in special cases seems more reasonable to me.

Hope that helps.


On 29.06.2016 05:24, Cody Innowhere wrote:
> Hi guys,
> I found that in CodeGenUtils, default values of numeric primitive types are
> set to -1, what's the consideration of setting the default values to -1
> instead of 0? IMHO 0 would make more sense, although in DB if a field is
> null then all operations on this field will return null anyway.

View raw message