Enum tidb_query_datatype::codec::batch::LazyBatchColumn [−][src]
A container stores an array of datums, which can be either raw (not decoded), or decoded into
the VectorValue
type.
TODO: Since currently the data format in response can be the same as in storage, we use this structure to avoid unnecessary repeated serialization / deserialization. In future, Coprocessor will respond all data in Chunk format which is different to the format in storage. At that time, this structure is no longer useful and should be removed.
Variants
Raw(BufferVec)
Decoded(VectorValue)
Implementations
impl LazyBatchColumn
[src]
pub fn raw_with_capacity(capacity: usize) -> Self
[src]
Creates a new LazyBatchColumn::Raw
with specified capacity.
pub fn decoded_with_capacity_and_tp(capacity: usize, eval_tp: EvalType) -> Self
[src]
Creates a new LazyBatchColumn::Decoded
with specified capacity and eval type.
pub fn clone_empty(&self, capacity: usize) -> Self
[src]
Creates a new empty LazyBatchColumn
with the same schema.
pub fn is_raw(&self) -> bool
[src]
pub fn is_decoded(&self) -> bool
[src]
pub fn decoded(&self) -> &VectorValue
[src]
pub fn mut_decoded(&mut self) -> &mut VectorValue
[src]
pub fn raw(&self) -> &BufferVec
[src]
pub fn mut_raw(&mut self) -> &mut BufferVec
[src]
pub fn len(&self) -> usize
[src]
pub fn truncate(&mut self, len: usize)
[src]
pub fn clear(&mut self)
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn capacity(&self) -> usize
[src]
pub fn ensure_decoded(
&mut self,
ctx: &mut EvalContext,
field_type: &FieldType,
logical_rows: LogicalRows<'_>
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
field_type: &FieldType,
logical_rows: LogicalRows<'_>
) -> Result<()>
Decodes this column if the column is not decoded, according to the given logical rows map.
After decoding, the decoded column will have the same physical layout as the encoded one
(i.e. the same logical rows), but elements in unnecessary positions will not be decoded
and will be None
.
The field type is needed because we use the same DateTime
structure when handling
Date, Time or Timestamp.
pub fn ensure_all_decoded_for_test(
&mut self,
ctx: &mut EvalContext,
field_type: &FieldType
) -> Result<()>
[src]
&mut self,
ctx: &mut EvalContext,
field_type: &FieldType
) -> Result<()>
pub fn maximum_encoded_size(&self, logical_rows: &[usize]) -> usize
[src]
Returns maximum encoded size.
pub fn maximum_encoded_size_chunk(&self, logical_rows: &[usize]) -> usize
[src]
Returns maximum encoded size in chunk format.
pub fn encode(
&self,
row_index: usize,
field_type: &impl FieldTypeAccessor,
ctx: &mut EvalContext,
output: &mut Vec<u8>
) -> Result<()>
[src]
&self,
row_index: usize,
field_type: &impl FieldTypeAccessor,
ctx: &mut EvalContext,
output: &mut Vec<u8>
) -> Result<()>
Encodes into binary format.
pub fn encode_chunk(
&self,
ctx: &mut EvalContext,
logical_rows: &[usize],
field_type: &FieldType,
output: &mut Vec<u8>
) -> Result<()>
[src]
&self,
ctx: &mut EvalContext,
logical_rows: &[usize],
field_type: &FieldType,
output: &mut Vec<u8>
) -> Result<()>
Encodes into Chunk format.
Trait Implementations
impl Clone for LazyBatchColumn
[src]
fn clone(&self) -> LazyBatchColumn
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LazyBatchColumn
[src]
impl From<VectorValue> for LazyBatchColumn
[src]
fn from(vec: VectorValue) -> Self
[src]
Auto Trait Implementations
impl RefUnwindSafe for LazyBatchColumn
impl Send for LazyBatchColumn
impl Sync for LazyBatchColumn
impl Unpin for LazyBatchColumn
impl UnwindSafe for LazyBatchColumn
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<V, W> ConvertFrom<W> for V where
W: ConvertTo<V>,
[src]
W: ConvertTo<V>,
pub fn convert_from(&mut EvalContext, W) -> Result<V, Error>
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,