async fn list_namespaces(&mut self) -> Result<()> {
        let namespaces = self
            .namespace_client
            .get_namespaces()
            .await
            .map_err(|e| Box::new(e) as _)
            .context(LoadingRemoteStateSnafu)?;

        let namespace_id: Int64Array = namespaces.iter().map(|ns| Some(ns.id)).collect();
        let name: StringArray = namespaces.iter().map(|ns| Some(&ns.name)).collect();

        let record_batch = RecordBatch::try_from_iter(vec![
            ("namespace_id", Arc::new(namespace_id) as ArrayRef),
            ("name", Arc::new(name) as ArrayRef),
        ])
        .expect("creating record batch successfully");

        self.print_results(&[record_batch])
    }
// print all namespaces to the output
print all namespaces to the output
print all namespaces to the output
async fn list_namespaces(&mut self) -> Result<()> {
        let namespaces = self
            .namespace_client
            .get_namespaces()
            .await
            .map_err(|e| Box::new(e) as _)
            .context(LoadingRemoteStateSnafu)?;
        let namespace_id: Int64Array = namespaces.iter().map(|ns| Some(ns.id)).collect();
        let name: StringArray = namespaces.iter().map(|ns| Some(&ns.name)).collect();
        let record_batch = RecordBatch::try_from_iter(vec![
            ("namespace_id", Arc::new(namespace_id) as ArrayRef),
            ("name", Arc::new(name) as ArrayRef),
        ])
        .expect("creating record batch successfully");
        self.print_results(&[record_batch])
    }
async fn list_namespaces ( & mut self ) -> Result < ( ) > { let namespaces = self . namespace_client . get_namespaces ( ) . await . map_err ( | e | Box :: new ( e ) as _ ) . context ( LoadingRemoteStateSnafu ) ? ; let namespace_id : Int64Array = namespaces . iter ( ) . map ( | ns | Some ( ns . id ) ) . collect ( ) ; let name : StringArray = namespaces . iter ( ) . map ( | ns | Some ( & ns . name ) ) . collect ( ) ; let record_batch = RecordBatch :: try_from_iter ( vec ! [ ( " " Arc new ( namespace_id ) as ArrayRef ) ( " " Arc new ( name ) as ArrayRef ) ] ) . expect ( " " ) ; self . print_results ( & [ record_batch ] ) }
print all namespaces to the output
print all namespaces to the output
&mut self
&mut self