FromArrow

Trait FromArrow 

Source
pub trait FromArrow {
Show 43 methods // Provided methods fn from_record_batch( &self, batch: &RecordBatch, ) -> Result<DataChunk, ArrayError> { ... } fn from_fields(&self, fields: &Fields) -> Result<StructType, ArrayError> { ... } fn from_field(&self, field: &Field) -> Result<DataType, ArrayError> { ... } fn from_large_utf8(&self) -> Result<DataType, ArrayError> { ... } fn from_large_binary(&self) -> Result<DataType, ArrayError> { ... } fn from_extension_type( &self, type_name: &str, physical_type: &DataType, ) -> Result<DataType, ArrayError> { ... } fn from_array( &self, field: &Field, array: &ArrayRef, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_extension_array( &self, type_name: &str, array: &ArrayRef, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_bool_array( &self, array: &BooleanArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_int16_array( &self, array: &Int16Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_int8_array( &self, array: &Int8Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_uint8_array( &self, array: &UInt8Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_uint16_array( &self, array: &UInt16Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_uint32_array( &self, array: &UInt32Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_int32_array( &self, array: &Int32Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_int64_array( &self, array: &Int64Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_int256_array( &self, array: &Decimal256Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_decimal128_array( &self, array: &Decimal128Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_uint64_array( &self, array: &UInt64Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_float16_array( &self, array: &Float16Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_float32_array( &self, array: &Float32Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_float64_array( &self, array: &Float64Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_date32_array( &self, array: &Date32Array, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_time64us_array( &self, array: &Time64MicrosecondArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_timestampsecond_array( &self, array: &TimestampSecondArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_timestampsecond_some_array( &self, array: &TimestampSecondArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_timestampms_array( &self, array: &TimestampMillisecondArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_timestampms_some_array( &self, array: &TimestampMillisecondArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_timestampus_array( &self, array: &TimestampMicrosecondArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_timestampus_some_array( &self, array: &TimestampMicrosecondArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_timestampns_array( &self, array: &TimestampNanosecondArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_timestampns_some_array( &self, array: &TimestampNanosecondArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_interval_array( &self, array: &IntervalMonthDayNanoArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_utf8_array( &self, array: &StringArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_utf8_view_array( &self, array: &StringViewArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_binary_array( &self, array: &BinaryArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_large_utf8_array( &self, array: &LargeStringArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_large_binary_array( &self, array: &LargeBinaryArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_list_array( &self, array: &ListArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_struct_array( &self, array: &StructArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn struct_fields_dominated( expected_fields: &Fields, actual_fields: &Fields, ) -> bool { ... } fn from_struct_array_projected( &self, expected_fields: &Fields, array: &StructArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_map_array(&self, array: &MapArray) -> Result<ArrayImpl, ArrayError> { ... }
}
Expand description

Defines how to convert Arrow arrays to RisingWave arrays.

Provided Methods§

Source

fn from_record_batch( &self, batch: &RecordBatch, ) -> Result<DataChunk, ArrayError>

Converts Arrow RecordBatch to RisingWave DataChunk.

Source

fn from_fields(&self, fields: &Fields) -> Result<StructType, ArrayError>

Converts Arrow Fields to RisingWave StructType.

Source

fn from_field(&self, field: &Field) -> Result<DataType, ArrayError>

Converts Arrow Field to RisingWave DataType.

Source

fn from_large_utf8(&self) -> Result<DataType, ArrayError>

Converts Arrow LargeUtf8 type to RisingWave data type.

Source

fn from_large_binary(&self) -> Result<DataType, ArrayError>

Converts Arrow LargeBinary type to RisingWave data type.

Source

fn from_extension_type( &self, type_name: &str, physical_type: &DataType, ) -> Result<DataType, ArrayError>

Converts Arrow extension type to RisingWave DataType.

Source

fn from_array( &self, field: &Field, array: &ArrayRef, ) -> Result<ArrayImpl, ArrayError>

Converts Arrow Array to RisingWave ArrayImpl.

Source

fn from_extension_array( &self, type_name: &str, array: &ArrayRef, ) -> Result<ArrayImpl, ArrayError>

Converts Arrow extension array to RisingWave ArrayImpl.

Source

fn from_bool_array(&self, array: &BooleanArray) -> Result<ArrayImpl, ArrayError>

Source

fn from_int16_array(&self, array: &Int16Array) -> Result<ArrayImpl, ArrayError>

Source

fn from_int8_array(&self, array: &Int8Array) -> Result<ArrayImpl, ArrayError>

Source

fn from_uint8_array(&self, array: &UInt8Array) -> Result<ArrayImpl, ArrayError>

Source

fn from_uint16_array( &self, array: &UInt16Array, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_uint32_array( &self, array: &UInt32Array, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_int32_array(&self, array: &Int32Array) -> Result<ArrayImpl, ArrayError>

Source

fn from_int64_array(&self, array: &Int64Array) -> Result<ArrayImpl, ArrayError>

Source

fn from_int256_array( &self, array: &Decimal256Array, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_decimal128_array( &self, array: &Decimal128Array, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_uint64_array( &self, array: &UInt64Array, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_float16_array( &self, array: &Float16Array, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_float32_array( &self, array: &Float32Array, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_float64_array( &self, array: &Float64Array, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_date32_array( &self, array: &Date32Array, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_time64us_array( &self, array: &Time64MicrosecondArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_timestampsecond_array( &self, array: &TimestampSecondArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_timestampsecond_some_array( &self, array: &TimestampSecondArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_timestampms_array( &self, array: &TimestampMillisecondArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_timestampms_some_array( &self, array: &TimestampMillisecondArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_timestampus_array( &self, array: &TimestampMicrosecondArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_timestampus_some_array( &self, array: &TimestampMicrosecondArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_timestampns_array( &self, array: &TimestampNanosecondArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_timestampns_some_array( &self, array: &TimestampNanosecondArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_interval_array( &self, array: &IntervalMonthDayNanoArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_utf8_array(&self, array: &StringArray) -> Result<ArrayImpl, ArrayError>

Source

fn from_utf8_view_array( &self, array: &StringViewArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_binary_array( &self, array: &BinaryArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_large_utf8_array( &self, array: &LargeStringArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_large_binary_array( &self, array: &LargeBinaryArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_list_array(&self, array: &ListArray) -> Result<ArrayImpl, ArrayError>

Source

fn from_struct_array( &self, array: &StructArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn struct_fields_dominated( expected_fields: &Fields, actual_fields: &Fields, ) -> bool

Returns true if all expected fields are present in actual_fields, and actual_fields has more fields or has them in a different order.

This is used to decide whether to use from_struct_array_projected (projection needed) or fall back to the normal from_struct_array path (exact match).

Source

fn from_struct_array_projected( &self, expected_fields: &Fields, array: &StructArray, ) -> Result<ArrayImpl, ArrayError>

Converts Arrow StructArray to RisingWave StructArray according to the expected fields.

This is mainly used for Parquet file source, where the upstream struct may contain extra fields. The conversion aligns fields by name, ignores extra fields, and keeps the expected field order.

Source

fn from_map_array(&self, array: &MapArray) -> Result<ArrayImpl, ArrayError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§