pub(crate) fn build_table_meta_from_column_metadatas(
table_id: TableId,
table_ref: TableReference<'_>,
table_meta: &RawTableMeta,
name_to_ids: Option<HashMap<String, u32>>,
column_metadata: &[ColumnMetadata],
) -> Result<RawTableMeta>Expand description
Builds a [RawTableMeta] from the provided [ColumnMetadata]s.
Returns an error if:
- Any column is missing in the
name_to_ids(ifname_to_idsis provided). - The column id in table metadata is not the same as the column id in the column metadata.(if
name_to_idsis provided) - The table index is missing in the column metadata.
- The primary key or partition key columns are missing in the column metadata.
TODO(weny): add tests