delta
                                
                                 delta copied to clipboard
                                
                                    delta copied to clipboard
                            
                            
                            
                        [Feature Request][Kernel] Add assertions on types to prevent misuses
Feature request
Which Delta project/connector is this regarding?
- [ ] Spark
- [ ] Standalone
- [ ] Flink
- [x] Kernel
- [ ] Other (fill in here)
Overview
Today the DataType/StructField object model is fairly loose, which allows for bugs like https://github.com/delta-io/delta/issues/4535 to creep in. We should add some assertions to the model to help catch bugs like this earlier. Specific business rules proposed:
- StructField's in Map/Array should not contain FieldMetadata.
- StructField's in Map should always have the name "key" and "value"
- StructField in Array should always have the value "element".
Motivation
Reduce future bugs.
Further details
N/A
Willingness to contribute
The Delta Lake Community encourages new feature contributions. Would you or another member of your organization be willing to contribute an implementation of this feature?
- [x] Yes. I can contribute this feature independently.
- [ ] Yes. I would be willing to contribute this feature with guidance from the Delta Lake community.
- [ ] No. I cannot contribute this feature at this time.