mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-21 07:20:41 +00:00
fix: drop unused pub fn using to cargo_workspace_unused (#5352)
* fix: drop unused pub fn using to cargo_workspace_unused Signed-off-by: yihong0618 <zouzou0208@gmail.com> * fix: seems is_sum can delete too Signed-off-by: yihong0618 <zouzou0208@gmail.com> --------- Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
@@ -108,11 +108,6 @@ impl Time {
|
||||
self.as_formatted_string("%H:%M:%S%.f%z", None)
|
||||
}
|
||||
|
||||
/// Format Time for system timeszone.
|
||||
pub fn to_system_tz_string(&self) -> String {
|
||||
self.as_formatted_string("%H:%M:%S%.f", None)
|
||||
}
|
||||
|
||||
/// Format Time for given timezone.
|
||||
/// When timezone is None, using system timezone by default.
|
||||
pub fn to_timezone_aware_string(&self, tz: Option<&Timezone>) -> String {
|
||||
|
||||
@@ -103,11 +103,6 @@ impl AggregateFunc {
|
||||
self.signature().generic_fn == GenericFn::Min
|
||||
}
|
||||
|
||||
/// if this function is a `sum`
|
||||
pub fn is_sum(&self) -> bool {
|
||||
self.signature().generic_fn == GenericFn::Sum
|
||||
}
|
||||
|
||||
/// Eval value, diff with accumulator
|
||||
///
|
||||
/// Expect self to be accumulable aggregate function, i.e. sum/count
|
||||
|
||||
@@ -489,12 +489,6 @@ impl RelationDesc {
|
||||
self
|
||||
}
|
||||
|
||||
/// Drops all existing keys.
|
||||
pub fn without_keys(mut self) -> Self {
|
||||
self.typ.keys.clear();
|
||||
self
|
||||
}
|
||||
|
||||
/// Builds a new relation description with the column names replaced with
|
||||
/// new names.
|
||||
///
|
||||
@@ -550,32 +544,6 @@ impl RelationDesc {
|
||||
pub fn get_name(&self, i: usize) -> &Option<ColumnName> {
|
||||
&self.names[i]
|
||||
}
|
||||
|
||||
/// Mutably gets the name of the `i`th column.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if `i` is not a valid column index.
|
||||
pub fn get_name_mut(&mut self, i: usize) -> &mut Option<ColumnName> {
|
||||
&mut self.names[i]
|
||||
}
|
||||
|
||||
/// Gets the name of the `i`th column if that column name is unambiguous.
|
||||
///
|
||||
/// If at least one other column has the same name as the `i`th column,
|
||||
/// returns `None`. If the `i`th column has no name, returns `None`.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// Panics if `i` is not a valid column index.
|
||||
pub fn get_unambiguous_name(&self, i: usize) -> Option<&ColumnName> {
|
||||
let name = &self.names[i];
|
||||
if self.iter_names().filter(|n| *n == name).count() == 1 {
|
||||
name.as_ref()
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The name of a column in a [`RelationDesc`].
|
||||
|
||||
@@ -144,36 +144,18 @@ impl<T> RepeatedField<T> {
|
||||
&self.as_ref()[start..end]
|
||||
}
|
||||
|
||||
/// Get mutable subslice of this container.
|
||||
#[inline]
|
||||
pub fn slice_mut(&mut self, start: usize, end: usize) -> &mut [T] {
|
||||
&mut self.as_mut_slice()[start..end]
|
||||
}
|
||||
|
||||
/// Get slice from given index.
|
||||
#[inline]
|
||||
pub fn slice_from(&self, start: usize) -> &[T] {
|
||||
&self.as_ref()[start..]
|
||||
}
|
||||
|
||||
/// Get mutable slice from given index.
|
||||
#[inline]
|
||||
pub fn slice_from_mut(&mut self, start: usize) -> &mut [T] {
|
||||
&mut self.as_mut_slice()[start..]
|
||||
}
|
||||
|
||||
/// Get slice to given index.
|
||||
#[inline]
|
||||
pub fn slice_to(&self, end: usize) -> &[T] {
|
||||
&self.as_ref()[..end]
|
||||
}
|
||||
|
||||
/// Get mutable slice to given index.
|
||||
#[inline]
|
||||
pub fn slice_to_mut(&mut self, end: usize) -> &mut [T] {
|
||||
&mut self.as_mut_slice()[..end]
|
||||
}
|
||||
|
||||
/// View this container as two slices split at given index.
|
||||
#[inline]
|
||||
pub fn split_at(&self, mid: usize) -> (&[T], &[T]) {
|
||||
|
||||
Reference in New Issue
Block a user