Skip to main content

Module schema

Module schema 

Source
Expand description

WpDataType(本 crate 的 9 变体枚举)→ Arrow 类型映射。

这是「类型化前端」,不是线协议契约的入口。 契约(wparse sink ↔ wfusion 接收)见 crate::contract::wp_type_to_arrow:它穷尽 wp_model_core::model::DataType 的 37 个变体, 而本模块的 WpDataType 是 9 变体的强类型前端,它自己的 ArrayList(inner)BigIntDecimal256 与线协议无关(契约口径是保守的:结构化与大整数一律 Utf8)。

⚠️ 所以不要用本模块的口径判断契约是否一致。详见 crate 级文档与 wp-reactor/docs/design/arrow-type-mapping.md(§1 A-0 / A-2)。

注意 WpDataType::Digit 的名字刻意保留:家族那轮 Digit → Int 正名没触及它, 因为改名会同时改字段元数据字符串与行为。

Structs§

FieldDef
A named, typed field definition for building Arrow schemas.

Enums§

WpDataType
WPL data types that can be mapped to Apache Arrow types.

Constants§

BIGINT_DECIMAL_PRECISION
BigInt 的 Decimal256 精度:2^129-1(IPv6 统一键上限)为 39 位十进制。 若未来编码位数超过 39,需同步增大此值。

Functions§

parse_wp_type
Parses a WPL type string into a WpDataType.
to_arrow_field
Converts a FieldDef into an Arrow ArrowField.
to_arrow_schema
Converts a slice of FieldDef into an Arrow Schema.
to_arrow_type
Maps a WpDataType to the corresponding ArrowDataType.