when I create table with not null or default column value , server reports error:
- sql:
CREATE TABLE person( person_idUInt64, nick_name String DEFAULT '123') ENGINE = BaseStorage PARTITION BY person_id
08:37:48 [DEBUG] (11) server: Found error: Unsupported language feature found
I found it does not support this now. Supporting not null syntax is easy, we can add not null matching in Rule::column_constraint, like:
Rule::column_constraint => {
let col = self
.tab
.columns
.last_mut()
.ok_or(LangError::CreateTableParsingError)?;
let constr = pair.as_str().trim().to_ascii_uppercase();
match constr.as_str() {
"PRIMARY KEY" => col.1.is_primary_key = true,
"NOT NULL" => col.1.is_nullable = false,
_ =>
return Err(LangError::UnsupportedLangFeatureError),
};
}
but it need more works to support default value.
when I create table with
not nullordefault column value, server reports error:CREATE TABLE person(person_idUInt64,nick_nameString DEFAULT '123') ENGINE = BaseStorage PARTITION BY person_id08:37:48 [DEBUG] (11) server: Found error: Unsupported language feature foundI found it does not support this now. Supporting
not nullsyntax is easy, we can addnot nullmatching inRule::column_constraint, like:but it need more works to support default value.