Struct tidb_query_datatype::codec::chunk::column::Column [−][src]
Column
stores the same column data of multi rows in one chunk.
Fields
length: usize
null_cnt: usize
null_bitmap: Vec<u8>
var_offsets: Vec<usize>
data: Vec<u8>
fixed_len: usize
Implementations
impl Column
[src]
pub fn new(field_type_tp: FieldTypeTp, init_cap: usize) -> Column
[src]
Create the column with a specified type and capacity.
pub fn from_raw_datums(
field_type: &FieldType,
raw_datums: &BufferVec,
logical_rows: &[usize],
ctx: &mut EvalContext
) -> Result<Self>
[src]
field_type: &FieldType,
raw_datums: &BufferVec,
logical_rows: &[usize],
ctx: &mut EvalContext
) -> Result<Self>
pub fn from_vector_value(
field_type: &FieldType,
v: &VectorValue,
logical_rows: &[usize]
) -> Result<Self>
[src]
field_type: &FieldType,
v: &VectorValue,
logical_rows: &[usize]
) -> Result<Self>
pub fn get_datum(
&self,
idx: usize,
field_type: &dyn FieldTypeAccessor
) -> Result<Datum>
[src]
&self,
idx: usize,
field_type: &dyn FieldTypeAccessor
) -> Result<Datum>
Get the datum of one row with the specified type.
pub fn append_datum(&mut self, data: &Datum) -> Result<()>
[src]
Append datum to the column.
pub fn new_fixed_len(element_len: usize, init_cap: usize) -> Column
[src]
Create a column with a fixed element length.
pub fn new_var_len_column(init_cap: usize) -> Column
[src]
Create a column with variant element length.
fn is_fixed(&self) -> bool
[src]
Return whether the column has a fixed length or not.
pub fn get_fixed_len(&self) -> usize
[src]
Return the column’s fixed length.
pub fn reset(&mut self)
[src]
Reset the column
pub fn is_null(&self, row_idx: usize) -> bool
[src]
Return whether the datum for the row is null or not.
fn append_null_bitmap(&mut self, on: bool)
[src]
Update the null bitmap and count when append a datum.
on
is false means the datum is null.
pub fn append_null(&mut self)
[src]
Append null to the column.
fn finish_append_fixed(&mut self)
[src]
Called when the fixed datum has been appended.
fn finished_append_var(&mut self)
[src]
Called when the variant datum has been appended.
pub fn append_i64(&mut self, v: i64) -> Result<()>
[src]
Append i64 datum to the column.
pub fn append_i64_datum(&mut self, src_datum: &[u8]) -> Result<()>
[src]
pub fn get_i64(&self, idx: usize) -> Result<i64>
[src]
Get the i64 datum of the row in the column.
pub fn append_u64(&mut self, v: u64) -> Result<()>
[src]
Append u64 datum to the column.
pub fn append_u64_datum(&mut self, src_datum: &[u8]) -> Result<()>
[src]
pub fn get_u64(&self, idx: usize) -> Result<u64>
[src]
Get the u64 datum of the row in the column.
pub fn append_f64(&mut self, v: f64) -> Result<()>
[src]
Append a f64 datum to the column.
pub fn append_f64_datum(&mut self, src_datum: &[u8]) -> Result<()>
[src]
pub fn append_f32(&mut self, v: f32) -> Result<()>
[src]
Append a f32 datum to the column.
pub fn append_f32_datum(&mut self, src_datum: &[u8]) -> Result<()>
[src]
pub fn get_f64(&self, idx: usize) -> Result<f64>
[src]
Get the f64 datum of the row in the column.
pub fn get_f32(&self, idx: usize) -> Result<f32>
[src]
Get the f32 datum of the row in the column.
pub fn append_bytes(&mut self, byte: &[u8]) -> Result<()>
[src]
Append a bytes datum to the column.
pub fn append_bytes_datum(&mut self, src_datum: &[u8]) -> Result<()>
[src]
pub fn get_bytes(&self, idx: usize) -> &[u8]
[src]
Get the bytes datum of the row in the column.
pub fn append_time(&mut self, t: Time) -> Result<()>
[src]
Append a time datum to the column.
pub fn append_time_datum(
&mut self,
src_datum: &[u8],
ctx: &mut EvalContext,
field_type: &FieldType
) -> Result<()>
[src]
&mut self,
src_datum: &[u8],
ctx: &mut EvalContext,
field_type: &FieldType
) -> Result<()>
pub fn get_time(&self, idx: usize) -> Result<Time>
[src]
Get the time datum of the row in the column.
pub fn append_duration(&mut self, d: Duration) -> Result<()>
[src]
Append a duration datum to the column.
pub fn append_duration_datum(&mut self, src_datum: &[u8]) -> Result<()>
[src]
pub fn get_duration(&self, idx: usize, fsp: isize) -> Result<Duration>
[src]
Get the duration datum of the row in the column.
pub fn append_decimal(&mut self, d: &Decimal) -> Result<()>
[src]
Append a decimal datum to the column.
pub fn append_decimal_datum(&mut self, src_datum: &[u8]) -> Result<()>
[src]
pub fn get_decimal(&self, idx: usize) -> Result<Decimal>
[src]
Get the decimal datum of the row in the column.
pub fn append_json(&mut self, j: JsonRef<'_>) -> Result<()>
[src]
Append a json datum to the column.
pub fn append_json_datum(&mut self, src_datum: &[u8]) -> Result<()>
[src]
Append a json datum in raw bytes to the column.
pub fn get_json(&self, idx: usize) -> Result<Json>
[src]
Get the json datum of the row in the column.
pub fn append_enum(&mut self, e: EnumRef<'_>) -> Result<()>
[src]
pub fn append_enum_datum(
&mut self,
src_datum: &[u8],
field_type: &FieldType
) -> Result<()>
[src]
&mut self,
src_datum: &[u8],
field_type: &FieldType
) -> Result<()>
pub fn get_enum(&self, idx: usize) -> Result<Enum>
[src]
Get the enum datum of the row in the column.
pub fn len(&self) -> usize
[src]
Return the total rows in the column.
pub fn is_empty(&self) -> bool
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnwindSafe for Column
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, 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>,