Repository navigation
Add ability to create defaults from aliases - #9489
Conversation
|
Merge after #9481. |
|
I think we should write in docs explicitly what we support in default and what we don't. |
|
Not clear what with complicated aliases / defaults which depend on other aliases / defaults etc, maybe test for that? I.e. something like That's not very clear how it should behave with circular references (as depending on columns provided at insert it can be resolvable or not), it seems the simplest option would be just to forbid such scenarios explicitly, but i'm not 100% sure. Can you check how it works / create a test for that? |
It works! ... and what are the types of |
|
I will add a test with cyclic aliases and explicit types. |
|
But it does not work if I specify data types. |
|
@filimonov Your queries don't work. I will add a test to ensure that they don't work. |
|
Will merge and then fix the case of In a separate PR. |
|
@alesapin I think that we can permit tables like this: To allow a user to insert one or another column. This have its use. |
I can execute this query and it will prevent the server to start! |
|
Maybe we should make a note in changelog - just in case if somebody was using circular aliases. |
#9603 Fix is here. |
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Now it's possible to create a column with
DEFAULTexpression which depends on a column with defaultALIASexpression.Fixes #2283 #8603