With version 0.12 of the library I get a 400 Error Schema field shouldn't be used as input with a view when I try to create a view.
In order to make it possible to create views using the library we need to make sure that there is a way to stop the library sending the schema field. The obvious way to do this would be to make the schema field an Option<TableSchema> but this has comparability implications for existing code.
The alternative approach that I went with is to add a is_none method to TableSchema so that we can skip serialisation for this field if its inner Option is none. I have tested this and it works as expected.
Changes
Fix a small diamond dependency problem related to hyper-rustls
Configured serde to skip the schema field if its inner fields variable is None
Testing
I have tested that it is still possible to create tables
I have also tested that it is now possible to create views using the library
Context
With version 0.12 of the library I get a 400 Error
Schema field shouldn't be used as input with a view
when I try to create a view.In order to make it possible to create views using the library we need to make sure that there is a way to stop the library sending the schema field. The obvious way to do this would be to make the schema field an
Option<TableSchema>
but this has comparability implications for existing code.The alternative approach that I went with is to add a
is_none
method toTableSchema
so that we can skip serialisation for this field if its inner Option is none. I have tested this and it works as expected.Changes
hyper-rustls
schema
field if its innerfields
variable isNone
Testing