File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,9 @@ pub fn validate_custom_partition(
122122 . get ( custom_partition_field. trim ( ) )
123123 . unwrap ( )
124124 . to_string ( ) ;
125- if custom_partition_value. is_empty ( ) {
125+ if custom_partition_value. is_empty ( )
126+ || custom_partition_value. eq_ignore_ascii_case ( "null" )
127+ {
126128 return Err ( anyhow ! ( format!(
127129 "ingestion failed as field {} is empty" ,
128130 custom_partition_field
@@ -155,7 +157,7 @@ pub fn validate_time_partition(
155157 30
156158 } ;
157159 let body_timestamp = value. get ( & time_partition. clone ( ) . unwrap ( ) . to_string ( ) ) ;
158- if body_timestamp. is_some ( ) {
160+ if body_timestamp. is_some ( ) && body_timestamp . unwrap ( ) . to_owned ( ) . as_str ( ) . is_some ( ) {
159161 if body_timestamp
160162 . unwrap ( )
161163 . to_owned ( )
You can’t perform that action at this time.
0 commit comments