leekeiabstraction commented on code in PR #169:
URL: https://github.com/apache/fluss-rust/pull/169#discussion_r2707160293


##########
crates/fluss/src/metadata/table.rs:
##########
@@ -198,6 +203,21 @@ impl SchemaBuilder {
         self
     }
 
+    /// Declares a column to be auto-incremented. With an auto-increment 
column in the table,
+    /// whenever a new row is inserted into the table, the new row will be 
assigned with the next
+    /// available value from the auto-increment sequence. A table can have at 
most one auto
+    /// increment column.
+    pub fn enable_auto_increment(mut self, column_name: &str) -> Result<Self> {
+        if !self.auto_increment_col_names.is_empty() {
+            return Err(IllegalArgument {
+                message: "Multiple auto increment columns are not supported 
yet.".to_string(),
+            });
+        }
+
+        self.auto_increment_col_names.push(column_name.to_string());

Review Comment:
   Checking here necessitate that column is populated before auto increment is 
specified. Better place to check is within build method



-- 
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]

Reply via email to