mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-17 09:17:14 +00:00
Implement Eq alongside Hash
It turns out implementing Hash alone is not very useful, as std::collection::HashMap keys are required to implement both Hash and Eq. Co-authored-by: Nikhil Benesch <nikhil.benesch@gmail.com>
This commit is contained in:
parent
f7199ec99f
commit
add898c2bd
6 changed files with 40 additions and 40 deletions
|
@ -13,7 +13,7 @@
|
|||
use ordered_float::OrderedFloat;
|
||||
|
||||
/// Primitive SQL values such as number and string
|
||||
#[derive(Debug, Clone, PartialEq, Hash)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub enum Value {
|
||||
/// Unsigned integer value
|
||||
Long(u64),
|
||||
|
@ -113,7 +113,7 @@ impl ToString for Value {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Hash)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub enum DateTimeField {
|
||||
Year,
|
||||
Month,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue