Aitozi commented on code in PR #36:
URL: https://github.com/apache/paimon-rust/pull/36#discussion_r1703165809


##########
crates/paimon/src/spec/types.rs:
##########
@@ -320,13 +323,16 @@ impl CharType {
 
     pub const MAX_LENGTH: usize = 255;
 
-    pub fn new(length: usize) -> Result<Self, &'static str> {
+    pub fn new(length: usize) -> Result<Self, Error> {
         Self::with_nullable(true, length)
     }
 
-    pub fn with_nullable(nullable: bool, length: usize) -> Result<Self, 
&'static str> {
+    pub fn with_nullable(nullable: bool, length: usize) -> Result<Self, Error> 
{
         if !(Self::MIN_LENGTH..=Self::MAX_LENGTH).contains(&length) {
-            return Err("Character string length must be between 1 and 255 
(both inclusive).");
+            return DataTypeInvalidSnafu {

Review Comment:
   Ok, make sense



-- 
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...@paimon.apache.org

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

Reply via email to