Skip to content

Commit

Permalink
fix: added extra 1 to number of columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilit0x committed Oct 19, 2023
1 parent 62a251a commit ab16756
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/servers/src/opentsdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,13 @@ pub fn data_point_to_grpc_row_insert_requests(
let tags = data_point.tags().clone();
let value = data_point.value();
let timestamp = data_point.ts_millis();
//length of tags + 1 extra column for greptime_timestamp
let num_columns = tags.len() + 1;
//length of tags + 2 extra columns for greptime_timestamp and the value
let num_columns = tags.len() + 2;

let table_data = multi_table_data.get_or_default_table_data(table_name, num_columns, 1);
let mut one_row = table_data.alloc_one_row();

//tags
// tags
row_writer::write_tags(table_data, tags.into_iter(), &mut one_row)?;

// value
Expand Down

0 comments on commit ab16756

Please sign in to comment.