fix DataType Error
@@ -48,7 +48,7 @@ fn test_cast_function() -> Result<()> {
display: "CAST",
nullable: false,
columns: vec![Series::new(vec!["4", "3", "2", "4"]).into()],
- func: CastFunction::create("toint16".to_string(), DataType::Int8),
+ func: CastFunction::create("toint16".to_string(), DataType::Int16),
cast_type: DataType::Int16,
expect: Series::new(vec![4i16, 3, 2, 4]),
error: "",
@@ -58,7 +58,7 @@ fn test_cast_function() -> Result<()> {
display: "CAST",
nullable: false,
columns: vec![Series::new(vec!["4", "3", "2", "4"]).into()],
- func: CastFunction::create("toint32".to_string(), DataType::Int8),
+ func: CastFunction::create("toint32".to_string(), DataType::Int32),
cast_type: DataType::Int32,
expect: Series::new(vec![4i32, 3, 2, 4]),
error: "",
@@ -68,7 +68,7 @@ fn test_cast_function() -> Result<()> {
display: "CAST",
nullable: false,
columns: vec![Series::new(vec!["4", "3", "2", "4"]).into()],
- func: CastFunction::create("toint64".to_string(), DataType::Int8),
+ func: CastFunction::create("toint64".to_string(), DataType::Int64),
cast_type: DataType::Int64,
expect: Series::new(vec![4i64, 3, 2, 4]),
error: "",
