You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "sunjincheng (Jira)" <ji...@apache.org> on 2021/02/17 01:09:00 UTC
[jira] [Created] (IOTDB-1158) Add nullable support for any datatype
sunjincheng created IOTDB-1158:
----------------------------------
Summary: Add nullable support for any datatype
Key: IOTDB-1158
URL: https://issues.apache.org/jira/browse/IOTDB-1158
Project: Apache IoTDB
Issue Type: New Feature
Components: Core/Engine
Reporter: sunjincheng
Assignee: sunjincheng
Attachments: image-2021-02-17-08-58-46-610.png
DDL of many databases can support not null syntax, such as MySQL [1]:
{code:java}
CREATE TABLE order (
item VARCHAR(255) NOT NULL,
amount FLOAT NOT NULL,
deal_date DATE
);
{code}
A column may contain only one `NOT NULL` constraint which specifies a rule that the column must not contain any `NULL` value. In other words, by default, `NULL` value is allowed.
For performance reasons, IoTDB does not support `NULL` value by default. Instead, it supports some business scenarios in the form of 'NaN'. As shown in the figure below:
!image-2021-02-17-08-58-46-610.png!
Therefore, in this JIRA., we will discuss whether we need to support `NULL` value and how to support `NULL` values in IoTDB, including session API and SQL API. I'd like to provide a draft of how to support the design, if you think this feature is necessary.
What are your thoughts?
[1] [https://www.mysqltutorial.org/mysql-not-null-constraint/]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)