gnuhpc commented on code in PR #629: URL: https://github.com/apache/fluss-rust/pull/629#discussion_r3443922820
########## crates/fluss/src/rpc/message/get_table_stats.rs: ########## @@ -0,0 +1,48 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use crate::rpc::api_key::ApiKey; +use crate::rpc::frame::{ReadError, WriteError}; +use crate::rpc::message::{ReadType, RequestBody, WriteType}; +use crate::{impl_read_type, impl_write_type, proto}; +use bytes::{Buf, BufMut}; +use prost::Message; + +#[derive(Debug, Default)] +pub struct GetTableStatsRequest { + pub inner_request: proto::GetTableStatsRequest, +} + +impl GetTableStatsRequest { + pub fn new(table_id: i64, buckets_req: Vec<proto::PbTableStatsReqForBucket>) -> Self { + GetTableStatsRequest { + inner_request: proto::GetTableStatsRequest { + table_id, + buckets_req, + target_columns: vec![], Review Comment: Not intentional — fixed in 720d069. `GetTableStatsRequest::new` now takes `target_columns: Vec<i32>` and threads it through. Single existing call site (the integration test on #632) will pass an explicit `vec![]` to preserve current behavior. Same drop-silently-features pattern also fixed on #631 (`alter_table` was hardcoding `vec![]` for drop/rename/modify columns); will be in the next force-push on that PR. ########## crates/fluss/src/rpc/message/alter_cluster_configs.rs: ########## @@ -0,0 +1,44 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use crate::rpc::api_key::ApiKey; +use crate::rpc::frame::{ReadError, WriteError}; +use crate::rpc::message::{ReadType, RequestBody, WriteType}; +use crate::{impl_read_type, impl_write_type, proto}; +use bytes::{Buf, BufMut}; +use prost::Message; + +#[derive(Debug, Default)] Review Comment: Done in 720d069. Dropped `#[derive(Default)]` on all 7 arg-taking wrappers added by this PR (`alter_cluster_configs`, `alter_database`, `alter_table`, `create_acls`, `drop_acls`, `get_table_stats`, `list_acls`). Kept `Default` on the param-less ones (`describe_cluster_configs`, `list_database_summaries`) since they match the pre-existing `list_databases.rs` precedent and `default()` produces a valid request there — happy to drop those too if you'd prefer strict uniformity. Same change applied to the 18 arg-taking wrappers on #630. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
