Closed craftslab closed 10 months ago
See: https://github.com/AmrDeveloper/GQL/blob/master/crates/gitql-ast/src/value.rs
Incorrect
pub fn equals(&self, other: &Self) -> bool {
if self.data_type() != other.data_type() {
return false;
}
match self.data_type() {
DataType::Any => true,
DataType::Text => self.as_text() == other.as_text(),
DataType::Integer => self.as_int() == other.as_int(),
DataType::Float => self.as_float() == other.as_float(),
DataType::Boolean => self.as_bool() == other.as_bool(),
DataType::DateTime => self.as_date() == other.as_date(),
DataType::Date => self.as_date() == other.as_date(),
DataType::Time => self.as_date() == other.as_date(),
DataType::Undefined => true,
DataType::Null => true,
_ => false,
}
}
Expected
DataType::DateTime => self.as_date_time() == other.as_date_time(),
DataType::Date => self.as_date() == other.as_date(),
DataType::Time => self.as_time() == other.as_time(),
Hello @craftslab,
Thank you for reporting, i fixed it now and will release it on 0.12.0
this week
Thank you, Amr Hesham
Fixed and released on 0.12.0
Describe the bug
Incorrect equals for DateTime and Time
To Reproduce
Expected behavior
GQL (please complete the following information):
Version 0.11.0
Screenshots