Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gibber9809 committed Dec 13, 2024
1 parent 896fe91 commit dd1539d
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion components/core/src/clp_s/ArchiveWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class ArchiveWriter {
epochtime_t ingest_timestamp_entry(
std::string const& key,
int32_t node_id,
std::string_view const timestamp,
std::string_view timestamp,
uint64_t& pattern_id
) {
return m_timestamp_dict.ingest_entry(key, node_id, timestamp, pattern_id);
Expand Down
4 changes: 2 additions & 2 deletions components/core/src/clp_s/ParsedMessage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ParsedMessage {
m_message.emplace(node_id, value);
}

inline void add_value(int32_t node_id, std::string_view const value) {
inline void add_value(int32_t node_id, std::string_view value) {
m_message.emplace(node_id, std::string{value});
}

Expand All @@ -61,7 +61,7 @@ class ParsedMessage {
m_unordered_message.emplace_back(value);
}

inline void add_unordered_value(std::string_view const value) {
inline void add_unordered_value(std::string_view value) {
m_unordered_message.emplace_back(std::string{value});
}

Expand Down
8 changes: 4 additions & 4 deletions components/core/src/clp_s/TimestampDictionaryWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ uint64_t TimestampDictionaryWriter::get_pattern_id(TimestampPattern const* patte
}

epochtime_t TimestampDictionaryWriter::ingest_entry(
std::string_view const key,
std::string_view key,
int32_t node_id,
std::string_view const timestamp,
std::string_view timestamp,
uint64_t& pattern_id
) {
epochtime_t ret;
Expand Down Expand Up @@ -90,7 +90,7 @@ epochtime_t TimestampDictionaryWriter::ingest_entry(
}

void TimestampDictionaryWriter::ingest_entry(
std::string_view const key,
std::string_view key,
int32_t node_id,
double timestamp
) {
Expand All @@ -105,7 +105,7 @@ void TimestampDictionaryWriter::ingest_entry(
}

void TimestampDictionaryWriter::ingest_entry(
std::string_view const key,
std::string_view key,
int32_t node_id,
int64_t timestamp
) {
Expand Down
8 changes: 4 additions & 4 deletions components/core/src/clp_s/TimestampDictionaryWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class TimestampDictionaryWriter {
* @return the epoch time corresponding to the string timestamp
*/
epochtime_t ingest_entry(
std::string_view const key,
std::string_view key,
int32_t node_id,
std::string_view const timestamp,
std::string_view timestamp,
uint64_t& pattern_id
);

Expand All @@ -61,9 +61,9 @@ class TimestampDictionaryWriter {
* @param node_id
* @param timestamp
*/
void ingest_entry(std::string_view const key, int32_t node_id, double timestamp);
void ingest_entry(std::string_view key, int32_t node_id, double timestamp);

void ingest_entry(std::string_view const key, int32_t node_id, int64_t timestamp);
void ingest_entry(std::string_view key, int32_t node_id, int64_t timestamp);

/**
* TODO: guarantee epoch milliseconds. The current clp-s approach to encoding timestamps and
Expand Down
2 changes: 1 addition & 1 deletion components/core/src/clp_s/TimestampEntry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class TimestampEntry {
m_epoch_start(cEpochTimeMax),
m_epoch_end(cEpochTimeMin) {}

TimestampEntry(std::string_view const key_name)
TimestampEntry(std::string_view key_name)
: m_encoding(UnkownTimestampEncoding),
m_epoch_start_double(cDoubleEpochTimeMax),
m_epoch_end_double(cDoubleEpochTimeMin),
Expand Down
12 changes: 6 additions & 6 deletions components/core/src/clp_s/TimestampPattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ append_padded_value_notz(int value, char padding_character, size_t max_length, s
* @return true if conversion succeeds, false otherwise
*/
static bool convert_string_to_number(
std::string_view const str,
std::string_view str,
size_t begin_ix,
size_t end_ix,
char padding_character,
Expand All @@ -91,7 +91,7 @@ static bool convert_string_to_number(
* @return true if conversion succeeds, false otherwise
*/
static bool convert_string_to_number_notz(
std::string_view const str,
std::string_view str,
size_t max_digits,
size_t begin_ix,
size_t& end_ix,
Expand Down Expand Up @@ -127,7 +127,7 @@ append_padded_value_notz(int value, char padding_character, size_t max_length, s
}

static bool convert_string_to_number(
std::string_view const str,
std::string_view str,
size_t begin_ix,
size_t end_ix,
char padding_character,
Expand Down Expand Up @@ -156,7 +156,7 @@ static bool convert_string_to_number(
}

static bool convert_string_to_number_notz(
std::string_view const str,
std::string_view str,
size_t max_digits,
size_t begin_ix,
size_t& end_ix,
Expand Down Expand Up @@ -308,7 +308,7 @@ void TimestampPattern::init() {
}

TimestampPattern const* TimestampPattern::search_known_ts_patterns(
std::string_view const line,
std::string_view line,
epochtime_t& timestamp,
size_t& timestamp_begin_pos,
size_t& timestamp_end_pos
Expand Down Expand Up @@ -344,7 +344,7 @@ void TimestampPattern::clear() {
}

bool TimestampPattern::parse_timestamp(
std::string_view const line,
std::string_view line,
epochtime_t& timestamp,
size_t& timestamp_begin_pos,
size_t& timestamp_end_pos
Expand Down
4 changes: 2 additions & 2 deletions components/core/src/clp_s/TimestampPattern.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class TimestampPattern {
* @return pointer to the timestamp pattern if found, nullptr otherwise
*/
static TimestampPattern const* search_known_ts_patterns(
std::string_view const line,
std::string_view line,
epochtime_t& timestamp,
size_t& timestamp_begin_pos,
size_t& timestamp_end_pos
Expand Down Expand Up @@ -123,7 +123,7 @@ class TimestampPattern {
* @return true if parsed successfully, false otherwise
*/
bool parse_timestamp(
std::string_view const line,
std::string_view line,
epochtime_t& timestamp,
size_t& timestamp_begin_pos,
size_t& timestamp_end_pos
Expand Down
1 change: 0 additions & 1 deletion components/core/src/clp_s/search/StringLiteral.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class StringLiteral : public Literal {
m_string_type = LiteralType::VarStringT;
}

// If '?' and '*' are not escaped, we add LiteralType::ClpStringT to m_string_type
if (StringUtils::has_unescaped_wildcards(m_v)) {
m_string_type |= LiteralType::ClpStringT;
}
Expand Down

0 comments on commit dd1539d

Please sign in to comment.