Skip to content

Commit

Permalink
fix wrong data type size
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Aug 18, 2022
1 parent 97fa3e2 commit 7cd4f9a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions common_types/src/datum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ impl DatumKind {
/// Return None for variable-length type
pub fn size(&self) -> Option<usize> {
let size = match self {
DatumKind::Null => 1,
DatumKind::Null => 0,
DatumKind::Timestamp => 8,
DatumKind::Double => 8,
DatumKind::Float => 8,
DatumKind::Float => 4,
DatumKind::Varbinary => return None,
DatumKind::String => return None,
DatumKind::UInt64 => 8,
Expand Down
5 changes: 3 additions & 2 deletions common_types/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,9 @@ impl Schema {
self.timestamp_index
}

/// Whether i-nth column is key column
/// TODO: should tag column be key columns?
/// Whether i-nth column is non-key column
///
/// Non-key means not timestamp/tag/primary key
pub fn non_key_column(&self, i: usize) -> bool {
if self.column(i).is_tag {
return false;
Expand Down

0 comments on commit 7cd4f9a

Please sign in to comment.