Apache Arrow 中的 StringType 和 LargeStringType 有什么区别?

Nek*_*pse 2 apache-arrow apache-arrow-cpp

根据文档:

class arrow::StringType : public arrow::BinaryType
#include <arrow/type.h>
Concrete type class for variable-size string data, utf8-encoded.
Run Code Online (Sandbox Code Playgroud)
class arrow::LargeStringType : public arrow::LargeBinaryType
#include <arrow/type.h>
Concrete type class for large variable-size string data, utf8-encoded.
Run Code Online (Sandbox Code Playgroud)

多大才算“大”?

这两种数据类型有什么区别?为什么我们需要 2 而不是 1?

li.*_*idm 6

字符串使用带符号的 32 位整数作为其偏移量/索引,因此字符串的长度不能超过 2 GiB,并且数组的数据总量不能超过 2 GiB。LargeString 使用 64 位整数,因此您可以拥有更长的字符串和更大的数组。