Skip to content

Commit

Permalink
fix out file for cases
Browse files Browse the repository at this point in the history
  • Loading branch information
amorynan committed Dec 4, 2023
1 parent 547c520 commit 2e784c4
Show file tree
Hide file tree
Showing 6 changed files with 3,132 additions and 3,141 deletions.
2 changes: 1 addition & 1 deletion be/src/util/slice.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ struct Slice {
/// Number of bytes of space that should be dropped from the beginning.
bool trim_double_quotes() {
int32_t begin = 0;
if (size > 2 && (data[begin] == '"' && data[size - 1] == '"')) {
if (size >= 2 && (data[begin] == '"' && data[size - 1] == '"')) {
data += 1;
size -= 2;
return true;
Expand Down
4 changes: 2 additions & 2 deletions be/test/vec/data_types/serde/data_type_serde_text_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,9 @@ TEST(TextSerde, ComplexTypeSerdeTextTest) {
"{\"hello "
"world\":0.2222222,\"hello2\":null,null:1111.1,\"null\":null,\"null\":"
"null,\"null\":0.1}"},
{"{\" ,.amory\":111.2343, \"\"\"\":112, \"dggs\":13.14, "
{"{\" ,.amory\":111.2343, \"\":112, \"dggs\":13.14, "
"null:12.2222222, \"\":null}",
"{\"\"\"\":null, null:12.44}", "{}", "{}", "\\N", "{}", "\\N",
"{\"\":null, null:12.44}", "{}", "{}", "\\N", "{}", "\\N",
"{null:null, \"null\":null}",
"{\"hello world\":0.2222222, \"hello2\":null, null:1111.1, "
"\"null\":null, \"null\":null, "
Expand Down
Loading

0 comments on commit 2e784c4

Please sign in to comment.