Commit c6deb44 1 parent b1f734f commit c6deb44 Copy full SHA for c6deb44
File tree 1 file changed +5
-8
lines changed
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,11 @@ impl NullabilityCheck {
25
25
26
26
impl StructField {
27
27
fn can_read_as ( & self , read_field : & StructField ) -> DeltaResult < ( ) > {
28
+ NullabilityCheck {
29
+ nullable : self . nullable ,
30
+ read_nullable : read_field. nullable ,
31
+ }
32
+ . is_compatible ( ) ?;
28
33
require ! (
29
34
self . name( ) == read_field. name( ) ,
30
35
Error :: generic( format!(
@@ -33,13 +38,6 @@ impl StructField {
33
38
read_field. name( )
34
39
) )
35
40
) ;
36
-
37
- NullabilityCheck {
38
- nullable : self . nullable ,
39
- read_nullable : read_field. nullable ,
40
- }
41
- . is_compatible ( ) ?;
42
-
43
41
self . data_type ( ) . can_read_as ( read_field. data_type ( ) ) ?;
44
42
Ok ( ( ) )
45
43
}
@@ -52,7 +50,6 @@ impl StructType {
52
50
. iter ( )
53
51
. map ( |( name, field) | ( name. to_lowercase ( ) , field) )
54
52
. collect ( ) ;
55
- // Delta tables do not allow fields that differ in name only by case
56
53
require ! (
57
54
field_map. len( ) == self . fields. len( ) ,
58
55
Error :: generic( "Delta tables don't allow field names that only differ by case" )
You can’t perform that action at this time.
0 commit comments