-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clp-s: Add support for decompression in ascending timestamp order. #440
Merged
gibber9809
merged 8 commits into
y-scope:main
from
gibber9809:timestamp-order-decompression
Jun 14, 2024
+110
−15
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
76f3735
Implement decompression in timestamp order
gibber9809 881fb52
Fix bug causing extra fake record to be decompressed from each table
gibber9809 bf4981f
Update components/core/src/clp_s/ArchiveReader.cpp
gibber9809 a405f6e
lint fix
gibber9809 f6527ef
Merge remote-tracking branch 'upstream' into timestamp-order-decompre…
gibber9809 3c83b1a
Address review comments
gibber9809 0a8285a
Merge branch 'main' into timestamp-order-decompression
gibber9809 4cf5019
Address review comment
gibber9809 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
#include "ColumnReader.hpp" | ||
#include "DictionaryReader.hpp" | ||
#include "ErrorCode.hpp" | ||
#include "FileWriter.hpp" | ||
#include "SchemaReader.hpp" | ||
#include "SchemaTree.hpp" | ||
#include "TraceableException.hpp" | ||
|
@@ -18,6 +19,7 @@ struct JsonConstructorOption { | |
std::string archives_dir; | ||
std::string archive_id; | ||
std::string output_dir; | ||
bool ordered; | ||
}; | ||
|
||
class JsonConstructor { | ||
|
@@ -50,9 +52,17 @@ class JsonConstructor { | |
void store(); | ||
|
||
private: | ||
/** | ||
* Reads all of the tables from m_archive_reader and writes all of the records | ||
* they contain to writer in timestamp order. | ||
* @param writer | ||
*/ | ||
void construct_in_order(FileWriter& writer); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a description for this method? |
||
|
||
std::string m_archives_dir; | ||
std::string m_archive_id; | ||
std::string m_output_dir; | ||
bool m_ordered{false}; | ||
|
||
std::unique_ptr<ArchiveReader> m_archive_reader; | ||
}; | ||
|
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 |
---|---|---|
|
@@ -185,6 +185,16 @@ class SchemaReader { | |
*/ | ||
static int32_t get_first_column_in_span(std::span<int32_t> schema); | ||
|
||
/** | ||
* @return the timestamp found in the row pointed to by m_cur_message | ||
*/ | ||
epochtime_t get_next_timestamp() const { return m_get_timestamp(); } | ||
|
||
/** | ||
* @return true if all records in this table have been iterated over, false otherwise | ||
*/ | ||
bool done() const { return m_cur_message >= m_num_messages; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to add a description for this method? |
||
|
||
private: | ||
/** | ||
* Merges the current local schema tree with the section of the global schema tree corresponding | ||
|
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to rename it to
initialize_schema_reader
?