Files
foxhunt/testing/integration/standalone/check_parquet_rows.rs
jgrusewski 9c3d741a08 refactor: restructure repo — crates/, bin/, testing/ layout
Move 17 library crates into crates/, CLI binary into bin/fxt,
consolidate 10 test crates into testing/, split config crate
from deployment config files.

Root directory reduced from 38+ to ~17 directories.
All Cargo.toml paths and build.rs proto refs updated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 11:56:00 +01:00

26 lines
853 B
Rust

//! Quick utility to check Parquet file row count
use std::fs::File;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let args: Vec<String> = std::env::args().collect();
let path = args.get(1).expect("Usage: check_parquet_rows <file.parquet>");
let file = File::open(path)?;
let builder = parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder::try_new(file)?;
let metadata = builder.metadata();
let mut total_rows = 0;
for i in 0..metadata.num_row_groups() {
total_rows += metadata.row_group(i).num_rows();
}
println!("{} rows in {}", total_rows, path);
println!("Minimum required: 120 rows (50 warmup + 60 lookback + 10 forecast)");
if total_rows < 120 {
println!("❌ INSUFFICIENT DATA");
} else {
println!("✅ Sufficient data");
}
Ok(())
}