fn handle_action(
        state: &S,
        action: &proto::transaction::action::Action,
        object_store: &Arc<ObjectStore>,
        server_id: ServerId,
        db_name: &str,
    ) -> Result<()> {
        match action {
            proto::transaction::action::Action::Upgrade(u) => {
                UnsupportedUpgrade {
                    format: u.format.clone(),
                }
                .fail()?;
            }
            proto::transaction::action::Action::AddParquet(a) => {
                let path = parse_dirs_and_filename(&a.path)?;
                let metadata =
                    thrift_to_parquet_metadata(&a.metadata).context(MetadataDecodingFailed)?;
                state.add(
                    Arc::clone(object_store),
                    server_id,
                    db_name,
                    CatalogParquetInfo { path, metadata },
                )?;
            }
            proto::transaction::action::Action::RemoveParquet(a) => {
                let path = parse_dirs_and_filename(&a.path)?;
                state.remove(path)?;
            }
        };
        Ok(())
    }
/// Handle the given action and populate data to the catalog state.
///
/// The deserializes the action state and passes it to the correct method in [`CatalogState`].
///
/// Note that this method is primarily for replaying transactions and will NOT append the given action to the
/// current transaction. If you also want to store the given action (e.g. during an in-progress transaction), use
/// [`handle_action_and_record`](Self::handle_action_and_record).
Handle the given action and populate data to the catalog state.
The deserializes the action state and passes it to the correct method in [`CatalogState`].

Note that this method is primarily for replaying transactions and will NOT append the given action to the
current transaction. If you also want to store the given action , use
[`handle_action_and_record`](Self::handle_action_and_record).
Handle the given action and populate data to the catalog state . The deserializes the action state and passes it to the correct method in [ ` CatalogState ` ] . Note that this method is primarily for replaying transactions and will NOT append the given action to the current transaction . If you also want to store the given action use [ ` handle_action_and_record ` ] ( Self :: handle_action_and_record ) .
fn handle_action(
        state: &S,
        action: &proto::transaction::action::Action,
        object_store: &Arc<ObjectStore>,
        server_id: ServerId,
        db_name: &str,
    ) -> Result<()> {
        match action {
            proto::transaction::action::Action::Upgrade(u) => {
                UnsupportedUpgrade {
                    format: u.format.clone(),
                }
                .fail()?;
            }
            proto::transaction::action::Action::AddParquet(a) => {
                let path = parse_dirs_and_filename(&a.path)?;
                let metadata =
                    thrift_to_parquet_metadata(&a.metadata).context(MetadataDecodingFailed)?;
                state.add(
                    Arc::clone(object_store),
                    server_id,
                    db_name,
                    CatalogParquetInfo { path, metadata },
                )?;
            }
            proto::transaction::action::Action::RemoveParquet(a) => {
                let path = parse_dirs_and_filename(&a.path)?;
                state.remove(path)?;
            }
        };
        Ok(())
    }
fn handle_action ( state : & S , action : & proto :: transaction :: action :: Action , object_store : & Arc < ObjectStore > , server_id : ServerId , db_name : & str , ) -> Result < ( ) > { match action { proto :: transaction :: action :: Action :: Upgrade ( u ) => { UnsupportedUpgrade { format : u . format . clone ( ) , } . fail ( ) ? ; } proto :: transaction :: action :: Action :: AddParquet ( a ) => { let path = parse_dirs_and_filename ( & a . path ) ? ; let metadata = thrift_to_parquet_metadata ( & a . metadata ) . context ( MetadataDecodingFailed ) ? ; state . add ( Arc :: clone ( object_store ) , server_id , db_name , CatalogParquetInfo { path , metadata } , ) ? ; } proto :: transaction :: action :: Action :: RemoveParquet ( a ) => { let path = parse_dirs_and_filename ( & a . path ) ? ; state . remove ( path ) ? ; } } ; Ok ( ( ) ) }
Handle the given action and populate data to the catalog state.
Handle the given action and populate data to the catalog state .
state
&S
action
&proto::transaction::action::Action
object_store
&Arc<ObjectStore>
server_id
ServerId
db_name
&str
state
&S
action
&proto::transaction::action::Action
object_store
&Arc<ObjectStore>
server_id
ServerId
db_name
&str