Skip to content

Commit

Permalink
Fix a missing definition level bug
Browse files Browse the repository at this point in the history
  • Loading branch information
the80srobot committed Dec 14, 2023
1 parent 1b5a39b commit 2f82a0b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/santad/Logs/EndpointSecurity/ParquetLogger/cpp_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use parquet2::{
compression::{BrotliLevel, CompressionOptions},
error::Error,
metadata::SchemaDescriptor,
schema::types::{ParquetType, PhysicalType},
schema::{types::{ParquetType, PhysicalType, PrimitiveType}, Repetition},
write::WriteOptions,
};

Expand Down Expand Up @@ -92,8 +92,10 @@ fn table_args_add_column(
match cxx_column_type_to_physical_type(column_type) {
None => Err(Error::InvalidParameter("invalid column type".to_string())),
Some(physical_type) => {
let mut field = PrimitiveType::from_physical(name.to_string(), physical_type);
field.field_info.repetition = Repetition::Required;
args.fields
.push(ParquetType::from_physical(name.to_string(), physical_type));
.push(ParquetType::PrimitiveType(field));
Ok(())
}
}
Expand Down

0 comments on commit 2f82a0b

Please sign in to comment.