Skip to content

Commit

Permalink
fix: fix name on marco
Browse files Browse the repository at this point in the history
  • Loading branch information
KKould committed Jul 26, 2024
1 parent 9e5ae4b commit 6be50ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/morseldb_marco/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ pub fn morsel_record(_args: TokenStream, input: TokenStream) -> TokenStream {

#(#from_record_batch_fields)*

let record = TestRef {
let record = #struct_ref_name {
#(#field_names)*
};
::morseldb::record::internal::InternalRecordRef::new(ts, record, null)
Expand Down Expand Up @@ -495,7 +495,7 @@ pub fn morsel_record(_args: TokenStream, input: TokenStream) -> TokenStream {
type Builder = #struct_builder_name;

fn builder(capacity: usize) -> Self::Builder {
TestBuilder {
#struct_builder_name {
#(#builder_init_fields)*

_null: ::arrow::array::BooleanBufferBuilder::new(capacity),
Expand Down Expand Up @@ -536,8 +536,8 @@ pub fn morsel_record(_args: TokenStream, input: TokenStream) -> TokenStream {
_ts: ::arrow::array::UInt32Builder,
}

impl ::morseldb::inmem::immutable::Builder<TestImmutableArrays> for #struct_builder_name {
fn push(&mut self, key: Timestamped<&str>, row: Option<TestRef>) {
impl ::morseldb::inmem::immutable::Builder<#struct_arrays_name> for #struct_builder_name {
fn push(&mut self, key: Timestamped<&str>, row: Option<#struct_ref_name>) {
#builder_append_primary_key
match row {
Some(row) => {
Expand Down
4 changes: 2 additions & 2 deletions src/record/str.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{mem::size_of, sync::Arc};
use std::{mem, sync::Arc};

use arrow::{
array::{
Expand Down Expand Up @@ -153,7 +153,7 @@ impl Builder<StringColumns> for StringColumnsBuilder {

fn written_size(&self) -> usize {
self._null.as_slice().len()
+ self._ts.values_slice().len() * size_of::<u32>()
+ mem::size_of_val(self._ts.values_slice())
+ self.string.values_slice().len()
}

Expand Down

0 comments on commit 6be50ce

Please sign in to comment.