fix end symbol

This commit is contained in:
HowePa 2024-04-30 20:34:08 +08:00
parent d85f6ae35d
commit 8f93df354e
2 changed files with 8 additions and 4 deletions

View File

@ -40,7 +40,11 @@ void writeNumpyStrings(const ColumnPtr & column, size_t length, WriteBuffer & bu
{
const auto * string_column = assert_cast<const ColumnType *>(column.get());
for (size_t i = 0; i < string_column->size(); ++i)
buf.write(string_column->getDataAt(i).data, length);
{
auto data = string_column->getDataAt(i);
buf.write(data.data, data.size);
writeChar(0, length - data.size, buf);
}
}
}

View File

@ -52,9 +52,9 @@ array String
[[0.1],[0.2]]
[[0.1],[0.2]]
[[0.1],[0.2]]
[['abb','bbc'],['ccc','dddd']]
[['abb','bbc'],['ccc','dddd']]
[['abb','bbc'],['ccc','dddd']]
[['a','bb'],['ccc','dddd']]
[['a','bb'],['ccc','dddd']]
[['a','bb'],['ccc','dddd']]
array Array(Array(Array(Int8)))
array Array(Array(Float64))
array Array(Array(String))