CTTY commented on code in PR #1441:
URL: https://github.com/apache/iceberg-rust/pull/1441#discussion_r2147267709


##########
crates/iceberg/src/transaction/sort_order.rs:
##########
@@ -15,32 +15,97 @@
 // specific language governing permissions and limitations
 // under the License.
 
+use std::sync::Arc;
+
+use async_trait::async_trait;
+
 use crate::error::Result;
 use crate::spec::{NullOrder, SortDirection, SortField, SortOrder, Transform};
-use crate::transaction::Transaction;
+use crate::table::Table;
+use crate::transaction::{ActionCommit, TransactionAction};
 use crate::{Error, ErrorKind, TableRequirement, TableUpdate};
 
+#[derive(Debug, PartialEq, Eq, Clone)]
+struct PendingSortField {
+    name: String,
+    direction: SortDirection,
+    null_order: NullOrder,
+}
+
 /// Transaction action for replacing sort order.
 pub struct ReplaceSortOrderAction {
-    pub tx: Transaction,
-    pub sort_fields: Vec<SortField>,
+    pending_sort_fields: Vec<PendingSortField>,
 }
 
 impl ReplaceSortOrderAction {
+    pub fn new() -> Self {
+        ReplaceSortOrderAction {
+            pending_sort_fields: vec![],
+        }
+    }
+
     /// Adds a field for sorting in ascending order.
-    pub fn asc(self, name: &str, null_order: NullOrder) -> Result<Self> {
+    pub fn asc(self, name: &str, null_order: NullOrder) -> Self {

Review Comment:
   Good point! I think supporting `Transform` based sorting in 
`ReplaceSortOrderAction` is a bigger effort and should be treated separately. 
I've created an issue here to track: 
https://github.com/apache/iceberg-rust/issues/1443



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to