Skip to content

Conversation

@yi-xmu
Copy link
Collaborator

@yi-xmu yi-xmu commented Oct 24, 2025

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Oct 24, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • vector

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch json_parse_funcs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

update
todo: head include

update util func

store as bigendian helper funcs

update pase json filed value helper func

fix parse json field value func

check the value boundary when parse json value
@yi-xmu yi-xmu force-pushed the type_def_for_support_schema branch from c4b07ee to 2dbff16 Compare November 7, 2025 06:00
std::memcpy(to, ptr, len);
#else
// sign bit
to[0] = (char) (ptr[len - 1] ^ 128);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use static_cast(...) instead [readability/casting] [4]

}
else
{ /* Set high and move exponent one up */
uint16_t exp_part = (((uint16_t) tmp[0] << 8) | (uint16_t) tmp[1] |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use static_cast<uint16_t>(...) instead [readability/casting] [4]

else
{ /* Set high and move exponent one up */
uint16_t exp_part = (((uint16_t) tmp[0] << 8) | (uint16_t) tmp[1] |
(uint16_t) 32768);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use static_cast<uint16_t>(...) instead [readability/casting] [4]

{ /* Set high and move exponent one up */
uint16_t exp_part = (((uint16_t) tmp[0] << 8) | (uint16_t) tmp[1] |
(uint16_t) 32768);
exp_part += (uint16_t) 1 << (16 - 1 - DBL_EXP_DIG);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Using C-style cast. Use static_cast<uint16_t>(...) instead [readability/casting] [4]

// Parse json field value to binary value based on field type
static inline bool ParseJSONFieldValue(const nlohmann::json &json_value,
MetadataFieldType field_type,
std::vector<char> &buf)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Add #include for vector<> [build/include_what_you_use] [4]

}
int64_t val = json_value.get<int64_t>();
if (val < std::numeric_limits<int64_t>::min() ||
val > std::numeric_limits<int64_t>::max())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Add #include for numeric_limits<> [build/include_what_you_use] [4]

{
return false;
}
std::string str = json_value.get<std::string>();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Add #include for string [build/include_what_you_use] [4]

std::memcpy(buf.data() + buf.size() - len_size - str_len,
str_len_ptr,
len_size);
std::copy(str.begin(), str.end(), buf.data() + buf.size() - str_len);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Add #include for copy [build/include_what_you_use] [4]

return true;
}

} // namespace EloqVec No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[cpplint] reported by reviewdog 🐶
Could not find a newline character at the end of the file. [whitespace/ending_newline] [5]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants