Skip to content
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

[SQL] Add support for 'default' column values #1061

Merged
merged 6 commits into from
Nov 27, 2023
Merged

[SQL] Add support for 'default' column values #1061

merged 6 commits into from
Nov 27, 2023

Conversation

mihaibudiu
Copy link
Collaborator

Is this a user-visible change (yes/no): yes
Fixes #1058

@mihaibudiu mihaibudiu changed the title [SQL] Add parser support for 'default' column values [SQL] Add support for 'default' column values Nov 23, 2023
@ryzhyk
Copy link
Contributor

ryzhyk commented Nov 24, 2023

@mihaibudiu , do we need to impose any restrictions on default values to make sure they are deterministic, so that replaying the same Kafka messages results in the same values in input tables?

mihaibudiu and others added 6 commits November 24, 2023 08:43
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Optimize `deserialize_table_record` and `deserialize_struct` macros.
Instead of assigning default values to fields before deserializing the
struct, we deserialize first and only assign defaults to missing fields.

Signed-off-by: Leonid Ryzhyk <leonid@feldera.com>
@mihaibudiu
Copy link
Collaborator Author

@mihaibudiu , do we need to impose any restrictions on default values to make sure they are deterministic, so that replaying the same Kafka messages results in the same values in input tables?

Right now we don't have support for any non deterministic function

@mihaibudiu mihaibudiu merged commit e363e7e into main Nov 27, 2023
5 checks passed
@mihaibudiu mihaibudiu deleted the default branch November 27, 2023 00:19
ryzhyk pushed a commit that referenced this pull request Feb 20, 2024
* [SQL] Add parser support for 'default' column values
* [SQL] Emit serde code for default values
* Optimize the handling of defaults in deserialization.

Optimize `deserialize_table_record` and `deserialize_struct` macros.
Instead of assigning default values to fields before deserializing the
struct, we deserialize first and only assign defaults to missing fields.

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Co-authored-by: Leonid Ryzhyk <leonid@feldera.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SQL] Support DEFAULT values for table DDL on column definitions
2 participants