Skip to content

Commit 5286782

Browse files
author
Devdutt Shenoi
authored
fix: run fields_mismatch against static_schema data also (#1123)
1 parent 02e2007 commit 5286782

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/event/format/json.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ impl EventFormat for Event {
4444
fn to_data(
4545
self,
4646
schema: &HashMap<String, Arc<Field>>,
47-
static_schema_flag: bool,
4847
time_partition: Option<&String>,
4948
schema_version: SchemaVersion,
5049
) -> Result<(Self::Data, Vec<Arc<Field>>, bool), anyhow::Error> {
@@ -94,8 +93,7 @@ impl EventFormat for Event {
9493
}
9594
};
9695

97-
if !static_schema_flag
98-
&& value_arr
96+
if value_arr
9997
.iter()
10098
.any(|value| fields_mismatch(&schema, value, schema_version))
10199
{

src/event/format/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ pub trait EventFormat: Sized {
9999
fn to_data(
100100
self,
101101
schema: &HashMap<String, Arc<Field>>,
102-
static_schema_flag: bool,
103102
time_partition: Option<&String>,
104103
schema_version: SchemaVersion,
105104
) -> Result<(Self::Data, EventSchema, bool), AnyError>;
@@ -115,7 +114,6 @@ pub trait EventFormat: Sized {
115114
) -> Result<(RecordBatch, bool), AnyError> {
116115
let (data, mut schema, is_first) = self.to_data(
117116
storage_schema,
118-
static_schema_flag,
119117
time_partition,
120118
schema_version,
121119
)?;

0 commit comments

Comments
 (0)