pub struct Decimal128Vector {
array: Decimal128Array,
}
Expand description
Decimal128Vector is a vector keep i128 values with precision and scale.
Fields§
§array: Decimal128Array
Implementations§
Source§impl Decimal128Vector
impl Decimal128Vector
Sourcepub fn from_values<I: IntoIterator<Item = i128>>(iter: I) -> Self
pub fn from_values<I: IntoIterator<Item = i128>>(iter: I) -> Self
Construct Vector from i128 values
Sourcepub fn from_slice<P: AsRef<[i128]>>(slice: P) -> Self
pub fn from_slice<P: AsRef<[i128]>>(slice: P) -> Self
Construct Vector from i128 values slice
Sourcepub fn from_wrapper_slice<P: AsRef<[Decimal128]>>(slice: P) -> Self
pub fn from_wrapper_slice<P: AsRef<[Decimal128]>>(slice: P) -> Self
Construct Vector from Wrapper(Decimal128) values slice
Sourcepub fn get_slice(&self, offset: usize, length: usize) -> Self
pub fn get_slice(&self, offset: usize, length: usize) -> Self
Get decimal128 value from vector by offset and length.
Sourcepub fn with_precision_and_scale(self, precision: u8, scale: i8) -> Result<Self>
pub fn with_precision_and_scale(self, precision: u8, scale: i8) -> Result<Self>
Returns a Decimal vector with the same data as self, with the specified precision and scale(should in Decimal128 range), and return error if value is out of precision bound.
For example: value = 12345, precision = 3, return error.
Sourcepub fn with_precision_and_scale_to_null(
self,
precision: u8,
scale: i8,
) -> Result<Self>
pub fn with_precision_and_scale_to_null( self, precision: u8, scale: i8, ) -> Result<Self>
Returns a Decimal vector with the same data as self, with the specified precision and scale(should in Decimal128 range), and return null if value is out of precision bound.
For example: value = 12345, precision = 3, the value will be casted to null.
Sourcepub fn value_as_string(&self, idx: usize) -> String
pub fn value_as_string(&self, idx: usize) -> String
Return decimal value as string
Sourcefn validate_decimal_precision(&self, precision: u8) -> Result<()>
fn validate_decimal_precision(&self, precision: u8) -> Result<()>
Validate decimal precision, if precision is invalid, return error.
Sourcefn null_if_overflow_precision(&self, precision: u8) -> Self
fn null_if_overflow_precision(&self, precision: u8) -> Self
Values that exceed the precision bounds will be casted to Null.
Sourcefn get_decimal128_value_from_array(&self, index: usize) -> Option<Decimal128>
fn get_decimal128_value_from_array(&self, index: usize) -> Option<Decimal128>
Get decimal128 Value from array by index.
Source§impl Decimal128Vector
impl Decimal128Vector
pub fn try_from_arrow_array( array: impl AsRef<dyn Array>, ) -> Result<Decimal128Vector>
Trait Implementations§
Source§impl Debug for Decimal128Vector
impl Debug for Decimal128Vector
Source§impl From<PrimitiveArray<Decimal128Type>> for Decimal128Vector
impl From<PrimitiveArray<Decimal128Type>> for Decimal128Vector
Source§impl PartialEq for Decimal128Vector
impl PartialEq for Decimal128Vector
Source§impl ScalarVector for Decimal128Vector
impl ScalarVector for Decimal128Vector
type OwnedItem = Decimal128
Source§type Iter<'a> = Decimal128Iter<'a>
type Iter<'a> = Decimal128Iter<'a>
Source§type Builder = Decimal128VectorBuilder
type Builder = Decimal128VectorBuilder
Source§fn get_data(&self, idx: usize) -> Option<Self::RefItem<'_>>
fn get_data(&self, idx: usize) -> Option<Self::RefItem<'_>>
fn from_slice(data: &[Self::RefItem<'_>]) -> Self
fn from_iterator<'a>(it: impl Iterator<Item = Self::RefItem<'a>>) -> Self
fn from_owned_iterator( it: impl Iterator<Item = Option<Self::OwnedItem>>, ) -> Self
fn from_vec<I: Into<Self::OwnedItem>>(values: Vec<I>) -> Self
Source§impl Serializable for Decimal128Vector
impl Serializable for Decimal128Vector
Source§impl Vector for Decimal128Vector
impl Vector for Decimal128Vector
Source§fn data_type(&self) -> ConcreteDataType
fn data_type(&self) -> ConcreteDataType
fn vector_type_name(&self) -> String
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Source§fn to_arrow_array(&self) -> ArrayRef
fn to_arrow_array(&self) -> ArrayRef
Source§fn to_boxed_arrow_array(&self) -> Box<dyn Array>
fn to_boxed_arrow_array(&self) -> Box<dyn Array>
Source§fn memory_size(&self) -> usize
fn memory_size(&self) -> usize
Source§impl VectorOp for Decimal128Vector
impl VectorOp for Decimal128Vector
Source§fn replicate(&self, offsets: &[usize]) -> VectorRef
fn replicate(&self, offsets: &[usize]) -> VectorRef
offsets
parameter. Read moreSource§fn find_unique(&self, selected: &mut BitVec, prev_vector: Option<&dyn Vector>)
fn find_unique(&self, selected: &mut BitVec, prev_vector: Option<&dyn Vector>)
i-th
bit of selected
to true
if the i-th
element of self
is unique, which
means there is no elements behind it have same value as it. Read moreSource§fn filter(&self, filter: &BooleanVector) -> Result<VectorRef>
fn filter(&self, filter: &BooleanVector) -> Result<VectorRef>
filter
(i.e. where the values are true). Read moreimpl StructuralPartialEq for Decimal128Vector
Auto Trait Implementations§
impl Freeze for Decimal128Vector
impl RefUnwindSafe for Decimal128Vector
impl Send for Decimal128Vector
impl Sync for Decimal128Vector
impl Unpin for Decimal128Vector
impl UnwindSafe for Decimal128Vector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T, V> Convert<T> for Vwhere
V: Into<T>,
impl<T, V> Convert<T> for Vwhere
V: Into<T>,
fn convert(value: Self) -> T
fn convert_box(value: Box<Self>) -> Box<T>
fn convert_vec(value: Vec<Self>) -> Vec<T>
fn convert_vec_box(value: Vec<Box<Self>>) -> Vec<Box<T>>
fn convert_matrix(value: Vec<Vec<Self>>) -> Vec<Vec<T>>
fn convert_option(value: Option<Self>) -> Option<T>
fn convert_option_box(value: Option<Box<Self>>) -> Option<Box<T>>
fn convert_option_vec(value: Option<Vec<Self>>) -> Option<Vec<T>>
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.