//! Internal row IDs carried alongside Polars rows.
//!
//! The reserved column is deliberately omitted from `TGASchema`; ordinary
//! dataset APIs and exports expose only scientific data columns.
use polars::prelude::{DataType, LazyFrame, col};
pub(crate) const ROW_ID_COLUMN: &str = "__kithe_internal_row_id";
pub(crate) fn fresh_namespace() -> String {
uuid::Uuid::new_v4().to_string()
}
pub(crate) fn attach_new_row_ids(frame: LazyFrame) -> LazyFrame {
frame
.with_row_index(ROW_ID_COLUMN, None)
.with_column(col(ROW_ID_COLUMN).cast(DataType::UInt64))
}