Skip to content
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

Get json object comments address #1924

Merged
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
615b38c
wip, check point before removing template
thirtiseven Apr 2, 2024
ac8089d
wip, check point before device_span
thirtiseven Apr 3, 2024
9d77ecd
wip, check point before device_span in evaluate_path
thirtiseven Apr 3, 2024
c6f52e6
wip, check point before separate size and writing value
thirtiseven Apr 3, 2024
88ace10
wip
thirtiseven Apr 3, 2024
2364902
Merge branch 'branch-24.06' into get-json-object-comments-address
thirtiseven Apr 24, 2024
ea1521e
checkpoint after merge latest code
thirtiseven Apr 24, 2024
314490d
checkpoint
thirtiseven Apr 24, 2024
ef24d02
checkpoint after apply comment address before merge
thirtiseven Apr 25, 2024
f814308
checkpoint, some size/output seperation
thirtiseven Apr 25, 2024
0a0fe3b
checkpoint: Move 2 variablesstring_token_utf8_bytes, bytes_diff_for_e…
thirtiseven Apr 25, 2024
938b7d4
Update src/main/cpp/src/json_parser.cuh
thirtiseven Apr 26, 2024
8873471
checkpoint for some benchmark
thirtiseven Apr 26, 2024
18e53af
delete json, cudf
thirtiseven Apr 28, 2024
edfca53
delete json, cudf
thirtiseven Apr 28, 2024
d97a4d3
checkpoint
thirtiseven Apr 28, 2024
392b048
checkpoint: address comments
thirtiseven Apr 28, 2024
9cdcc1f
minor refactor
thirtiseven Apr 28, 2024
27b5baf
Split 'Switch string to double in getJsonObject back to cudf' out
thirtiseven Apr 28, 2024
30c3eca
refactor
thirtiseven Apr 28, 2024
bc8c35c
upmerge
thirtiseven Apr 29, 2024
aea0055
clean up
thirtiseven Apr 29, 2024
78493d7
clean up
thirtiseven Apr 29, 2024
0ecfdc9
fix test failed
thirtiseven Apr 29, 2024
1f094be
fix try_skip_unicode bug
thirtiseven Apr 30, 2024
28387a9
address comments
thirtiseven May 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions src/main/cpp/src/ftos_converter.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ __device__ inline int to_chars(floating_decimal_64 const v, bool const sign, cha
// Values in the interval [1E-3, 1E7) are special.
if (scientificNotation) {
// Print in the format x.xxxxxE-yy.
for (int i = 0; i < olength - 1; ++i) {
for (auto i = 0; i < olength - 1; ++i) {
int const c = output % 10;
output /= 10;
result[index + olength - i] = (char)('0' + c);
Expand Down Expand Up @@ -836,31 +836,31 @@ __device__ inline int to_chars(floating_decimal_64 const v, bool const sign, cha
// Decimal dot is before any of the digits.
result[index++] = '0';
result[index++] = '.';
for (int i = -1; i > exp; i--) {
for (auto i = -1; i > exp; i--) {
result[index++] = '0';
}
int current = index;
for (int i = 0; i < olength; i++) {
for (auto i = 0; i < olength; i++) {
result[current + olength - i - 1] = (char)('0' + output % 10);
output /= 10;
index++;
}
} else if (exp + 1 >= static_cast<int32_t>(olength)) {
// Decimal dot is after any of the digits.
for (int i = 0; i < olength; i++) {
for (auto i = 0; i < olength; i++) {
result[index + olength - i - 1] = (char)('0' + output % 10);
output /= 10;
}
index += olength;
for (int i = olength; i < exp + 1; i++) {
for (auto i = olength; i < exp + 1; i++) {
result[index++] = '0';
}
result[index++] = '.';
result[index++] = '0';
} else {
// Decimal dot is somewhere between the digits.
int current = index + 1;
for (int i = 0; i < olength; i++) {
for (auto i = 0; i < olength; i++) {
if (olength - i - 1 == exp) {
result[current + olength - i - 1] = '.';
current--;
Expand Down Expand Up @@ -926,7 +926,7 @@ __device__ inline int to_chars(floating_decimal_32 const v, bool const sign, cha

if (scientificNotation) {
// Print in the format x.xxxxxE-yy.
for (int i = 0; i < olength - 1; i++) {
for (auto i = 0; i < olength - 1; i++) {
int c = output % 10;
output /= 10;
result[index + olength - i] = (char)('0' + c);
Expand All @@ -950,31 +950,31 @@ __device__ inline int to_chars(floating_decimal_32 const v, bool const sign, cha
// Decimal dot is before any of the digits.
result[index++] = '0';
result[index++] = '.';
for (int i = -1; i > exp; i--) {
for (auto i = -1; i > exp; i--) {
result[index++] = '0';
}
int current = index;
for (int i = 0; i < olength; i++) {
for (auto i = 0; i < olength; i++) {
result[current + olength - i - 1] = (char)('0' + output % 10);
output /= 10;
index++;
}
} else if (exp + 1 >= olength) {
// Decimal dot is after any of the digits.
for (int i = 0; i < olength; i++) {
for (auto i = 0; i < olength; i++) {
result[index + olength - i - 1] = (char)('0' + output % 10);
output /= 10;
}
index += olength;
for (int i = olength; i < exp + 1; i++) {
for (auto i = olength; i < exp + 1; i++) {
result[index++] = '0';
}
result[index++] = '.';
result[index++] = '0';
} else {
// Decimal dot is somewhere between the digits.
int current = index + 1;
for (int i = 0; i < olength; i++) {
for (auto i = 0; i < olength; i++) {
if (olength - i - 1 == exp) {
result[current + olength - i - 1] = '.';
current--;
Expand Down Expand Up @@ -1284,7 +1284,7 @@ __device__ inline int to_formatted_chars(T const v, bool const sign, char* const
if (digits == 0) { return index; }
result[index++] = '.';
int actual_round = digits;
for (int i = -1; i > exp; i--) {
for (auto i = -1; i > exp; i--) {
index_for_carrier = index;
result[index++] = '0';
actual_round--;
Expand All @@ -1301,14 +1301,14 @@ __device__ inline int to_formatted_chars(T const v, bool const sign, char* const
rounded_output -= POW10_TABLE[actual_olength];
}
int current = index;
for (int i = 0; i < actual_olength; i++) {
for (auto i = 0; i < actual_olength; i++) {
result[current + actual_olength - i - 1] = (char)('0' + rounded_output % 10);
rounded_output /= 10;
index++;
}
actual_round -= actual_olength;
if (actual_round > 0) {
for (int i = 0; i < actual_round; i++) {
for (auto i = 0; i < actual_round; i++) {
result[index++] = '0';
}
}
Expand All @@ -1317,15 +1317,15 @@ __device__ inline int to_formatted_chars(T const v, bool const sign, char* const
int integer_len = index + exp + 1 + exp / 3;
int sep_cnt = 0;
int rev_index = 0;
for (int i = olength; i < exp + 1; i++) {
for (auto i = olength; i < exp + 1; i++) {
result[integer_len - (rev_index++) - 1] = '0';
sep_cnt++;
if (sep_cnt == 3) {
result[integer_len - (rev_index++) - 1] = ',';
sep_cnt = 0;
}
}
for (int i = 0; i < olength; i++) {
for (auto i = 0; i < olength; i++) {
if (sep_cnt == 3) {
result[integer_len - (rev_index++) - 1] = ',';
sep_cnt = 0;
Expand All @@ -1337,7 +1337,7 @@ __device__ inline int to_formatted_chars(T const v, bool const sign, char* const
index = integer_len;
if (digits == 0) { return index; }
result[index++] = '.';
for (int i = 0; i < digits; i++) {
for (auto i = 0; i < digits; i++) {
result[index++] = '0';
}
} else {
Expand All @@ -1356,7 +1356,7 @@ __device__ inline int to_formatted_chars(T const v, bool const sign, char* const
int32_t formated_integer_len = index + integer_len + (integer_len - 1) / 3;
int32_t sep_cnt = 0;
int rev_index = 0;
for (int i = 0; i < integer_len; i++) {
for (auto i = 0; i < integer_len; i++) {
if (sep_cnt == 3) {
result[formated_integer_len - (rev_index++) - 1] = ',';
sep_cnt = 0;
Expand All @@ -1369,11 +1369,11 @@ __device__ inline int to_formatted_chars(T const v, bool const sign, char* const
if (digits == 0) { return index; }
result[index++] = '.';
int current = index;
for (int i = 0; i < tailing_zero; i++) {
for (auto i = 0; i < tailing_zero; i++) {
result[current + digits - i - 1] = '0';
index++;
}
for (int i = tailing_zero; i < digits; i++) {
for (auto i = tailing_zero; i < digits; i++) {
result[current + digits - i - 1] = (char)('0' + decimal % 10);
decimal /= 10;
index++;
Expand Down Expand Up @@ -1430,7 +1430,7 @@ __device__ inline int copy_format_special_str(char* const result,
} else {
result[sign + 1] = '.';
}
for (int i = 0; i < digits; i++) {
for (auto i = 0; i < digits; i++) {
result[sign + 2 + i] = '0';
}
return sign + 2 + digits;
Expand Down
Loading
Loading