KipData/FnckSQL

Fix null failure of insert part

KKould opened this issue · 1 comments

KKould commented

Bug Report

when inserting some null values, the DataType conversion fails.

because AST recognizes null in Insert Values ​​as DataValue::Null, and the data type Null corresponding to KipSQL's DataValue::i32 is represented as i32(None)
therefore, Binder::bind_insert should convert the DataType::Null of expr in the cols again according to the datatype of the corresponding catalog (if the DataType of ColumnCataLog is DataType::i32, then DataValue::Null -> DataValue::i32(None) )

#32 some specific examples
Some tips:

  1. the error maybe caused by binder
  2. DataValue Builder Null is not supported
CleanShot 2023-07-28 at 23 46 01@2x