-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move parquet buffered serializer into common/serializer
- Loading branch information
1 parent
97217db
commit 18cd20c
Showing
51 changed files
with
467 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
add_library(kuzu_common_serializer | ||
OBJECT | ||
serializer.cpp | ||
deserializer.cpp | ||
buffered_file.cpp | ||
buffered_serializer.cpp) | ||
|
||
set(ALL_OBJECT_FILES | ||
${ALL_OBJECT_FILES} $<TARGET_OBJECTS:kuzu_common_serializer> | ||
PARENT_SCOPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "common/serializer/buffered_file.h" | ||
|
||
#include "common/file_utils.h" | ||
|
||
namespace kuzu { | ||
namespace common { | ||
void BufferedFileWriter::flush() { | ||
FileUtils::writeToFile(fileInfo.get(), buffer.get(), bufferOffset, fileOffset); | ||
fileOffset += bufferOffset; | ||
bufferOffset = 0; | ||
memset(buffer.get(), 0, BUFFER_SIZE); | ||
} | ||
|
||
void BufferedFileReader::readNextPage() { | ||
FileUtils::readFromFile(fileInfo.get(), buffer.get(), BUFFER_SIZE, fileOffset); | ||
fileOffset += BUFFER_SIZE; | ||
bufferOffset = 0; | ||
} | ||
|
||
} // namespace common | ||
} // namespace kuzu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "common/serializer/deserializer.h" | ||
|
||
namespace kuzu { | ||
namespace common { | ||
|
||
template<> | ||
void Deserializer::deserializeValue<std::string>(std::string& value) { | ||
uint64_t valueLength = 0; | ||
deserializeValue(valueLength); | ||
value.resize(valueLength); | ||
reader->read((uint8_t*)value.data(), valueLength); | ||
} | ||
|
||
} // namespace common | ||
} // namespace kuzu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "common/file_utils.h" | ||
#include "common/serializer/buffered_file.h" | ||
|
||
namespace kuzu { | ||
namespace common { | ||
|
||
void BufferedFileWriter::flush() { | ||
FileUtils::writeToFile(fileInfo.get(), buffer.get(), bufferOffset, fileOffset); | ||
fileOffset += bufferOffset; | ||
bufferOffset = 0; | ||
memset(buffer.get(), 0, BUFFER_SIZE); | ||
} | ||
|
||
void BufferedFileReader::readNextPage() { | ||
FileUtils::readFromFile(fileInfo.get(), buffer.get(), BUFFER_SIZE, fileOffset); | ||
fileOffset += BUFFER_SIZE; | ||
bufferOffset = 0; | ||
} | ||
|
||
} // namespace common | ||
} // namespace kuzu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.