Skip to content

Commit

Permalink
fix offset in li typest_casts and array_casts.
Browse files Browse the repository at this point in the history
  • Loading branch information
yiyuanliu committed Dec 13, 2023
1 parent 3237244 commit 6487539
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/function/cast/array_casts.cpp
Expand Up @@ -130,7 +130,7 @@ static bool ArrayToVarcharCast(Vector &source, Vector &result, idx_t count, Cast

out_data[i] = StringVector::EmptyString(result, array_varchar_length);
auto dataptr = out_data[i].GetDataWriteable();
auto offset = 0;
idx_t offset = 0;
dataptr[offset++] = '[';

// Second pass, write the actual data
Expand Down
2 changes: 1 addition & 1 deletion src/function/cast/list_casts.cpp
Expand Up @@ -104,7 +104,7 @@ static bool ListToVarcharCast(Vector &source, Vector &result, idx_t count, CastP
}
result_data[i] = StringVector::EmptyString(result, list_length);
auto dataptr = result_data[i].GetDataWriteable();
auto offset = 0;
idx_t offset = 0;
dataptr[offset++] = '[';
for (idx_t list_idx = 0; list_idx < list.length; list_idx++) {
auto idx = list.offset + list_idx;
Expand Down

0 comments on commit 6487539

Please sign in to comment.