-
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.
- Loading branch information
Showing
26 changed files
with
307 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"(()" |
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,4 @@ | ||
list | str | ||
'(this | is a word | normal not escape | ~' ( ) | , ~~ ~' )'|'try escape ~~' | ||
'(escape | is escape success? ~~)'|' ~' ( ) do not need to escape sepeical | ()' | ||
'(~~ ~' not work also this "~'" )'|'nu' |
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 @@ | ||
"[432412, 34234, 23424]" |
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 @@ | ||
"((hello),(bdfadf),)" |
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 @@ | ||
'[23, 432, 234]' |
Empty file.
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,7 @@ | ||
"[[1,3,423,124,43242],[432]]" | ||
" [ [ 1 ,3, 423 , 124,43242 ] , [ 432 ]]" | ||
"[ [ 1 ,3, 423 , 124,43242 ] , [432]] " | ||
"[,[], [1, 2, 3]]" | ||
"[null, NULL, Null, nUll, nuLl, nulL, nuLL, NUll, NuLl , NulL, [1, 2, 3]]" | ||
"[[], [], [] ]" | ||
"[, ,]" |
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 @@ | ||
"['fdsfdsfe werw]" |
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 @@ | ||
"[[' this is a signle quote]]" |
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 @@ | ||
"[{32, 32]" |
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,57 @@ | ||
#include "function/cast/cast_utils.h" | ||
|
||
namespace kuzu { | ||
namespace function { | ||
|
||
bool tryCastToBool(const char* input, uint64_t len, bool& result) { | ||
common::StringUtils::removeCStringWhiteSpaces(input, len); | ||
|
||
switch (len) { | ||
case 1: { | ||
char c = std::tolower(*input); | ||
if (c == 't' || c == '1') { | ||
result = true; | ||
return true; | ||
} else if (c == 'f' || c == '0') { | ||
result = false; | ||
return true; | ||
} | ||
return false; | ||
} | ||
case 4: { | ||
auto t = std::tolower(input[0]); | ||
auto r = std::tolower(input[1]); | ||
auto u = std::tolower(input[2]); | ||
auto e = std::tolower(input[3]); | ||
if (t == 't' && r == 'r' && u == 'u' && e == 'e') { | ||
result = true; | ||
return true; | ||
} | ||
return false; | ||
} | ||
case 5: { | ||
auto f = std::tolower(input[0]); | ||
auto a = std::tolower(input[1]); | ||
auto l = std::tolower(input[2]); | ||
auto s = std::tolower(input[3]); | ||
auto e = std::tolower(input[4]); | ||
if (f == 'f' && a == 'a' && l == 'l' && s == 's' && e == 'e') { | ||
result = false; | ||
return true; | ||
} | ||
return false; | ||
} | ||
default: | ||
return false; | ||
} | ||
} | ||
|
||
void castStringToBool(const char* input, uint64_t len, bool& result) { | ||
if (!tryCastToBool(input, len, result)) { | ||
throw common::ConversionException( | ||
"Cast failed. " + std::string{input, len} + " is not in BOOL range."); | ||
} | ||
} | ||
|
||
} // namespace function | ||
} // 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
2 changes: 1 addition & 1 deletion
2
src/include/storage/in_mem_storage_structure/in_mem_column_chunk.h
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.