New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tb does not support not null and default column value when creating table #201
Comments
@ygf11 Yes, for the compatibility, it may be nice to accept a PR. Commonly, CH uses Nullable type to indicate NULL-like, others is NOT NULL in default. (Mixed Nullable and NULL keyword seems a little bad...but from mysql side, this is still good to have) Default keyword support is great. It is asking a server side processing mechanism which we have done for partition key expressions. You may have a try. |
@jinmingjian ok, let me have a try. |
@jinmingjian thanks for your suggestions. you are right, It is really a large pr, so changing plan or RFC is needed.
my plan:
|
@ygf11 thanks for your ideas.
You can use serde crate, rather than your home brown algo unless yours are really faster and simpler like old zero-copy. If you really do not want to use serde, it is better to leave the document/comment about your own ser/des.
This is OK. I mean, it is better to firstly solve the problem for production-use. But this depends on your idea. I suggest you complete this issue in a gradual way because you are in your first contribution. For default expression, we can first implement the literal, then the general one column and then multiple columns. So, it is not necessary for involving jit side thing firstly. Carefully design is great but it is better to leave ideas with all guys known. And sorry, the original codes have less comment. This is not good for newcomers. I will change this for further iteration. And it is greatly welcome more comments from more friends. |
@jinmingjian thanks for your suggestions. |
when I create table with
not null
ordefault column value
, server reports error:CREATE TABLE person(
person_idUInt64,
nick_nameString 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 addnot null
matching inRule::column_constraint
, like:but it need more works to support default value.
The text was updated successfully, but these errors were encountered: