fn gen_table_plan_with_source(
context: OptimizerContextRef,
source_catalog: SourceCatalog,
append_only: bool,
on_conflict: Option<OnConflict>,
with_version_column: Option<String>,
version: Option<TableVersion>,
database_id: u32,
schema_id: u32,
) -> Result<(PlanRef, PbTable), RwError>