risingwave_common::types

Type Alias F32

source
pub type F32 = OrderedFloat<f32>;
Expand description

A 32-bit floating point type with total order.

Aliased Type§

struct F32(pub f32);

Fields§

§0: f32

Trait Implementations§

source§

impl FromIntoArrow for F32

source§

type ArrowType = f32

The corresponding element type in the Arrow array.
source§

fn from_arrow(value: Self::ArrowType) -> Self

source§

fn into_arrow(self) -> Self::ArrowType

source§

impl FromIntoArrow for F32

source§

type ArrowType = f32

The corresponding element type in the Arrow array.
source§

fn from_arrow(value: Self::ArrowType) -> Self

source§

fn into_arrow(self) -> Self::ArrowType

source§

impl HashKeyDe for F32

source§

fn deserialize(_data_type: &DataType, buf: impl Buf) -> Self

source§

impl HashKeySer<'_> for F32

source§

fn serialize_into(self, buf: impl BufMut)

Serialize the scalar into the given buffer.
source§

fn exact_size() -> Option<usize>

Returns Some if the serialized size is known for this scalar type.
source§

fn estimated_size(self) -> usize

Returns the estimated serialized size for this scalar.
source§

impl NativeType for F32

source§

impl PrimitiveArrayItemType for F32

source§

const DATA_TYPE: DataType = DataType::Float32

The data type.
source§

fn erase_array_type(arr: PrimitiveArray<Self>) -> ArrayImpl

A helper to convert a primitive array to ArrayImpl.
source§

fn try_into_array(arr: ArrayImpl) -> Option<PrimitiveArray<Self>>

A helper to convert ArrayImpl to self.
source§

fn try_into_array_ref(arr: &ArrayImpl) -> Option<&PrimitiveArray<Self>>

A helper to convert ArrayImpl to self.
source§

fn array_type() -> ArrayType

Returns array type of the primitive array
source§

fn to_protobuf<T: Write>(self, output: &mut T) -> ArrayResult<usize>

source§

fn from_protobuf(cur: &mut Cursor<&[u8]>) -> ArrayResult<Self>

source§

impl Scalar for F32

source§

type ScalarRefType<'a> = OrderedFloat<f32>

Type for reference of Scalar
source§

fn as_scalar_ref(&self) -> Self

Get a reference to current scalar.
source§

fn to_scalar_value(self) -> ScalarImpl

source§

impl<'scalar> ScalarRef<'scalar> for F32

source§

type ScalarType = OrderedFloat<f32>

ScalarType is the owned type of current ScalarRef.
source§

fn to_owned_scalar(&self) -> Self

Convert ScalarRef to an owned scalar.
source§

fn hash_scalar<H: Hasher>(&self, state: &mut H)

A wrapped hash function to get the hash value for this scaler.
source§

impl ToBinary for F32

source§

impl ToText for F32

source§

fn write<W: Write>(&self, f: &mut W) -> Result

Write the text to the writer regardless of its data type Read more
source§

fn write_with_type<W: Write>(&self, ty: &DataType, f: &mut W) -> Result

Write the text to the writer according to its data type
source§

fn to_text_with_type(&self, ty: &DataType) -> String

Convert to text according to its data type
source§

fn to_text(&self) -> String

to_text is a special version of to_text_with_type, it convert the scalar to default type text. E.g. for Int64, it will convert to text as a Int64 type. We should prefer to use to_text_with_type because it’s more clear and readable. Read more
source§

impl TryFrom<ScalarImpl> for F32

source§

type Error = ArrayError

The type returned in the event of a conversion error.
source§

fn try_from(val: ScalarImpl) -> ArrayResult<Self>

Performs the conversion.
source§

impl<'scalar> TryFrom<ScalarRefImpl<'scalar>> for F32

source§

type Error = ArrayError

The type returned in the event of a conversion error.
source§

fn try_from(val: ScalarRefImpl<'scalar>) -> ArrayResult<Self>

Performs the conversion.
source§

impl<'a> WithDataType for &'a F32

source§

fn default_data_type() -> DataType

Returns the most obvious DataType for the rust type.
source§

impl<'a> WithDataType for &'a mut F32

source§

fn default_data_type() -> DataType

Returns the most obvious DataType for the rust type.
source§

impl WithDataType for Box<F32>

source§

fn default_data_type() -> DataType

Returns the most obvious DataType for the rust type.
source§

impl WithDataType for F32

source§

fn default_data_type() -> DataType

Returns the most obvious DataType for the rust type.
source§

impl NumericType for F32