fn handle_action<S>(
        state: &mut S,
        action: &proto::transaction::action::Action,
        object_store: &Arc<ObjectStore>,
    ) -> Result<()>
    where
        S: CatalogState,
    {
        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 file_size_bytes = a.file_size_bytes as usize;

                let metadata =
                    IoxParquetMetaData::from_thrift(&a.metadata).context(MetadataDecodingFailed)?;
                let metadata = Arc::new(metadata);

                state.add(
                    Arc::clone(object_store),
                    CatalogParquetInfo {
                        path,
                        file_size_bytes,
                        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 want to store the given action (e.g. during an in-progress transaction), use
/// [`record_action`](Self::record_action).
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 want to store the given action , use
[`record_action`](Self::record_action).
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 want to store the given action use [ ` record_action ` ] ( Self :: record_action ) .
fn handle_action<S>(
        state: &mut S,
        action: &proto::transaction::action::Action,
        object_store: &Arc<ObjectStore>,
    ) -> Result<()>
    where
        S: CatalogState,
    {
        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 file_size_bytes = a.file_size_bytes as usize;
                let metadata =
                    IoxParquetMetaData::from_thrift(&a.metadata).context(MetadataDecodingFailed)?;
                let metadata = Arc::new(metadata);
                state.add(
                    Arc::clone(object_store),
                    CatalogParquetInfo {
                        path,
                        file_size_bytes,
                        metadata,
                    },
                )?;
            }
            proto::transaction::action::Action::RemoveParquet(a) => {
                let path = parse_dirs_and_filename(&a.path)?;
                state.remove(path)?;
            }
        };
        Ok(())
    }
fn handle_action < S > ( state : & mut S , action : & proto :: transaction :: action :: Action , object_store : & Arc < ObjectStore > , ) -> Result < ( ) > where S : CatalogState , { 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 file_size_bytes = a . file_size_bytes as usize ; let metadata = IoxParquetMetaData :: from_thrift ( & a . metadata ) . context ( MetadataDecodingFailed ) ? ; let metadata = Arc :: new ( metadata ) ; state . add ( Arc :: clone ( object_store ) , CatalogParquetInfo { path , file_size_bytes , 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
&mut S
action
&proto::transaction::action::Action
object_store
&Arc<ObjectStore>
state
&mut S
action
&proto::transaction::action::Action
object_store
&Arc<ObjectStore>