Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
acquamarin committed Oct 10, 2023
1 parent 75d5431 commit 45983c9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ void BasicColumnWriter::prepare(ColumnWriterState& stateToPrepare, ColumnWriterS
auto& col_chunk = state.row_group.columns[state.col_idx];

uint64_t start = 0;
auto vcount =
parent ? parent->definitionLevels.size() - state.definitionLevels.size() : count;
auto vcount = parent ? parent->definitionLevels.size() - state.definitionLevels.size() : count;
auto parent_index = state.definitionLevels.size();
handleRepeatLevels(state, parent, count, maxRepeat);
handleDefineLevels(state, parent, vector, count, maxDefine, maxDefine - 1);
Expand Down Expand Up @@ -90,7 +89,8 @@ void BasicColumnWriter::beginWrite(ColumnWriterState& writerState) {
NextPage(state);
}

void BasicColumnWriter::write(ColumnWriterState& writerState, common::ValueVector* vector, uint64_t count) {
void BasicColumnWriter::write(
ColumnWriterState& writerState, common::ValueVector* vector, uint64_t count) {
auto& state = reinterpret_cast<BasicColumnWriterState&>(writerState);

uint64_t remaining = count;
Expand Down Expand Up @@ -300,8 +300,7 @@ void BasicColumnWriter::SetParquetStatistics(
column_chunk.meta_data.__isset.statistics = true;
}
for (const auto& write_info : state.write_info) {
column_chunk.meta_data.encodings.push_back(
write_info.pageHeader.data_page_header.encoding);
column_chunk.meta_data.encodings.push_back(write_info.pageHeader.data_page_header.encoding);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "processor/operator/persistent/writer/parquet/boolean_column_writer.h"

namespace kuzu {
namespace processor {

}
}
namespace processor {}
} // namespace kuzu
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
namespace kuzu {
namespace processor {

#define PARQUET_DEFINE_VALID 65535

using namespace kuzu_parquet::format;
using namespace kuzu::common;

Expand Down Expand Up @@ -179,7 +177,7 @@ void ColumnWriter::handleDefineLevels(ColumnWriterState& state, ColumnWriterStat
uint64_t vector_index = 0;
while (state.definitionLevels.size() < parent->definitionLevels.size()) {
auto current_index = state.definitionLevels.size();
if (parent->definitionLevels[current_index] != PARQUET_DEFINE_VALID) {
if (parent->definitionLevels[current_index] != ParquetConstants::PARQUET_DEFINE_VALID) {
state.definitionLevels.push_back(parent->definitionLevels[current_index]);
} else if (!vector->isNull(vector->state->selVector->selectedPositions[vector_index])) {
state.definitionLevels.push_back(defineValue);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#include "processor/operator/persistent/writer/parquet/standard_column_writer.h"

namespace kuzu {
namespace processor {



}
}
namespace processor {}
} // namespace kuzu

0 comments on commit 45983c9

Please sign in to comment.