Skip to main content

is_metadata_column_name

Function is_metadata_column_name 

Source
pub fn is_metadata_column_name(column_name: &str) -> bool
Expand description

Checks if a column name is a data-table metadata column.

Mirrors Java MetadataColumns.isMetadataColumn(String) (backed by its META_COLUMNS allowlist plus the _partition special case): a column name is a data-table metadata column only if it is one of the reserved names that a scan can project.

This deliberately excludes two groups of reserved names that Java also keeps out of META_COLUMNS:

  • the position-delete-file internal columns pos, file_path, and row, so a user data column of the same name is not shadowed during a scan (issue #2837);
  • the changelog columns _change_type, _change_ordinal, and _commit_snapshot_id.

get_metadata_field_id still maps the reserved names it knows (including pos and file_path) to their field ids; only this membership check excludes them. (row has no reserved id in this crate, so get_metadata_field_id("row") is an error.)

§Arguments

  • column_name - The column name to check

§Returns

true if the column name is a data-table metadata column, false otherwise