Replies: 4 comments 5 replies
-
Thanks for @sundy-li starting the discussion. It's very meaningful to determine how to define and process |
Beta Was this translation helpful? Give feedback.
-
Maybe we can list pros & cons of the schemes here? Personally, I prefer C. Making nullability a part of type can avoid passing an extra boolean variable The disadvantage of |
Beta Was this translation helpful? Give feedback.
-
For option C, "In this way, queries can work most efficiently." Could you please be more specific ? I can imagine Arrow may benefit from Non-nullable column and be more efficient in computing. Besides that, any thing else we can get ? |
Beta Was this translation helpful? Give feedback.
-
A:Pros: We don't have to worried about dirty values in expression/functions. In Cons:
B:Pros: Be compatible with MySQL behavior. Cons: In C:Pros: Much more efficient as C. It's a DataType, we can use it in expression like A did. We can know the result is nullable or not just by the schema. Cons: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is
Expression
nullable or not?Should we make nullable as a special & separated datatype or just a constraint property?
Nullable is annoyment but we must take into consideration.
Some kind of ways to handle the nullable:
A. Nullable is property, every expression can be nullable, if a column is declared as
not null
constraint, we should use a validator to check the valuesB. Similiar to A, Nullable is property but every expression can be nullable and not nullable, Scalar Functions can produce Nullable results only if the argument's DataType is nullable.
C. Nullable is not a property, it's a special datatype, like
Nullable(UInt8)
in ClickHouse style. Scalar Functions can produce Nullable results only if the argument's DataType is nullable. In this way, queries can work most efficiently.ClickHouse takes NotNull datatype as default, yet MySQL takes Nullable as default constraint.
Beta Was this translation helpful? Give feedback.
All reactions