Skip to main content

UdfFromArrow

Trait UdfFromArrow 

Source
pub trait UdfFromArrow {
Show 46 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_fixed_size_binary(&self) -> Result<DataType, ArrayError> { ... } fn from_extension_type( &self, type_name: &str, physical_type: &DataType, ) -> Result<DataType, ArrayError> { ... } fn from_array( &self, expected_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_time32s_array( &self, array: &Time32SecondArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_time32ms_array( &self, array: &Time32MillisecondArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_time64us_array( &self, array: &Time64MicrosecondArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_time64ns_array( &self, array: &Time64NanosecondArray, ) -> 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_fixed_size_binary_array( &self, array: &FixedSizeBinaryArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_list_array( &self, expected_field: &Field, array: &ListArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_struct_array( &self, expected_field: &Field, array: &StructArray, ) -> Result<ArrayImpl, ArrayError> { ... } fn from_map_array( &self, expected_field: &Field, 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_fixed_size_binary(&self) -> Result<DataType, ArrayError>

Converts Arrow FixedSizeBinary 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, expected_field: &Field, array: &ArrayRef, ) -> Result<ArrayImpl, ArrayError>

Converts Arrow Array to RisingWave ArrayImpl.

expected_field is the declared-side field: it selects the extension decode and authoritatively drives the alignment of nested struct/list/map children.

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_time32s_array( &self, array: &Time32SecondArray, ) -> Result<ArrayImpl, ArrayError>

Source

fn from_time32ms_array( &self, array: &Time32MillisecondArray, ) -> Result<ArrayImpl, ArrayError>

Source

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

Source

fn from_time64ns_array( &self, array: &Time64NanosecondArray, ) -> 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_fixed_size_binary_array( &self, array: &FixedSizeBinaryArray, ) -> Result<ArrayImpl, ArrayError>

Source

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

Converts an Arrow ListArray, decoding elements by the expected element field so that nested decode keeps following the declared schema. Falls back to the array’s own element field when the expected field does not describe a list.

Source

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

Converts an Arrow StructArray by the expected struct field: children align by name (first occurrence, extras dropped), positionally when a name is missing but the arity matches (an external UDF may label struct children differently, as its signature check ignores nested field names), and error otherwise. Extensions are taken from the expected side only.

The result carries the expected field names with the decoded child types: the expected field may be a lossy rendering of the declared type (e.g. iceberg has no 16-bit int), so the decoded types are authoritative and any divergence from the declared type stays visible to the callers’ boundary checks.

Falls back to the array’s own fields when the expected field does not describe a struct.

Source

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

Converts an Arrow MapArray, decoding entries by the expected entries field. Falls back to the array’s own entries field when the expected field does not describe a map.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§