T-143: M2.2c — tools/curate-etl: Zstd Parquet writer for fundamentals_pit/year=YYYY/part.parquet (flat latest-period + TTM snapshot rows from FundamentalsSnapshot<i32>) with restatement round-trip test (no new crates, no CLI/bench changes)

This commit is contained in:
Studio 2026-12-01 21:56:47 -05:00
parent f1a60dcdd0
commit 288fdec14d
5 changed files with 2619 additions and 2 deletions

View file

@ -24,6 +24,7 @@ pub mod parquet_adj;
pub mod parquet_bars;
pub mod parquet_corporate_actions;
pub mod parquet_events;
pub mod parquet_fundamentals;
pub mod parquet_fx;
mod parquet_publish;
pub mod parquet_shorts;
@ -160,6 +161,11 @@ pub use parquet_events::{
events_parquet_schema, write_events_dataset, EventsParquetRow, EventsWriteOptions,
EventsWriteStats, ParquetEventsError,
};
pub use parquet_fundamentals::{
fundamentals_pit_parquet_schema, write_fundamentals_pit_dataset, FundamentalsPitLatestPeriod,
FundamentalsPitParquetRow, FundamentalsPitWriteOptions, FundamentalsPitWriteStats,
ParquetFundamentalsError,
};
pub use parquet_fx::{
fx_1d_parquet_schema, write_fx_1d_dataset, Fx1dParquetRow, Fx1dWriteOptions, Fx1dWriteStats,
ParquetFxError,

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -363,6 +363,25 @@ fn next_column<'a>(
}
}
pub(crate) fn write_bool_col(
rg_writer: &mut SerializedRowGroupWriter<'_, BufWriter<File>>,
values: &[bool],
def_levels: Option<&[i16]>,
) -> Result<(), ParquetError> {
let mut col = next_column(rg_writer)?;
match col.untyped() {
ColumnWriter::BoolColumnWriter(typed) => {
typed.write_batch(values, def_levels, None)?;
}
_ => {
return Err(ParquetError::General(
"expected BOOLEAN column writer".to_string(),
));
}
}
col.close()
}
pub(crate) fn write_i32_col(
rg_writer: &mut SerializedRowGroupWriter<'_, BufWriter<File>>,
values: &[i32],