-
Notifications
You must be signed in to change notification settings - Fork 465
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
Option to have null defaults for avro sink schema #21842
Option to have null defaults for avro sink schema #21842
Conversation
Fixes a bug introduced in MaterializeInc#21842 and detected by @guswynn here https://github.com/MaterializeInc/materialize/pull/21482/files#r1310695260 Fixes #21496 Signed-off-by: Petros Angelatos <[email protected]>
Fixes a bug introduced in MaterializeInc#21842 and detected by @guswynn here https://github.com/MaterializeInc/materialize/pull/21482/files#r1310695260 Fixes #21496 Signed-off-by: Petros Angelatos <[email protected]>
42f7e04
to
86c615c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parser/plan parts lgtm.
Moving to draft, looking into ci failures. |
I like where we landed with |
@@ -77,7 +77,7 @@ impl fmt::Debug for JsonEncoder { | |||
"schema", | |||
&format!( | |||
"{:?}", | |||
build_row_schema_json(&self.value_columns, "schema", &BTreeMap::new()) | |||
build_row_schema_json(&self.value_columns, "schema", &BTreeMap::new(), false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto here––using boolean params in the outermost API isn't ideal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am leaving this one in. In the following avro updates, there will be more configs like user defined comments and eventually user defined default values which should live in a struct along with this flag.
32a5e40
to
e347730
Compare
moar tests
Co-authored-by: Sean Loiselle <[email protected]>
refactored slightly update
e347730
to
86fcbdc
Compare
Seeing a "the in-memory state of the catalog does not match its on-disk state" error. Not happening locally though. Checking what's causing it. https://buildkite.com/materialize/tests/builds/64317#018abe9b-c962-4aea-b8d2-b87209dfdee5/1438-1440 |
5e632a9
to
ec7a329
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Feel free to re-request review if you feel it's necessary after you mark this as non-draft.
Co-authored-by: umanwizard <[email protected]>
Addressed the feedback, set this to auto-merge. |
Also added 2 small parsing checks Follow-up to MaterializeInc#21842 which I missed
Also added 2 small parsing checks Follow-up to MaterializeInc#21842 which I missed
Also added 2 small parsing checks Follow-up to MaterializeInc#21842 which I missed
Also added 2 small parsing checks Follow-up to MaterializeInc#21842 which I missed
Also added 2 small parsing checks Follow-up to MaterializeInc#21842 which I missed
Fixes a bug introduced in MaterializeInc#21842 and detected by @guswynn here https://github.com/MaterializeInc/materialize/pull/21482/files#r1310695260 Fixes #21496 Signed-off-by: Petros Angelatos <[email protected]>
This adds a way to specify an option
NULL DEFAULTS
in theCREATE SINK
sql. If this is set, then the generated avro schema will have nullable fields with default value ofnull
.Motivation
Fixes https://github.com/MaterializeInc/database-issues/issues/6549
Tips for reviewer
I added testdrive tests to check some nesting and various combination of how that flag could be specified. Please let me know what else will be valuable to test.
Checklist
$T ⇔ Proto$T
mapping (possibly in a backwards-incompatible way), then it is tagged with aT-proto
label.