diff --git a/src/common/base/src/bytes.rs b/src/common/base/src/bytes.rs index 96f47588f1..1bbf5b296e 100644 --- a/src/common/base/src/bytes.rs +++ b/src/common/base/src/bytes.rs @@ -20,16 +20,6 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize)] pub struct Bytes(bytes::Bytes); -impl Bytes { - pub fn len(&self) -> usize { - self.0.len() - } - - pub fn is_empty(&self) -> bool { - self.0.is_empty() - } -} - impl From for bytes::Bytes { fn from(value: Bytes) -> Self { value.0 diff --git a/src/sql/src/statements/statement_query.rs b/src/sql/src/statements/statement_query.rs deleted file mode 100644 index b54d4df270..0000000000 --- a/src/sql/src/statements/statement_query.rs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2023 Greptime Team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use sqlparser::ast::Query as SpQuery; - -use crate::errors::ParserError; - -/// Query statement instance. -#[derive(Debug, Clone, PartialEq)] -pub struct Query { - pub inner: SpQuery, -} - -/// Automatically converts from sqlparser Query instance to SqlQuery. -impl TryFrom for Query { - type Error = ParserError; - - fn try_from(q: SpQuery) -> Result { - Ok(Query { inner: q }) - } -} - -impl TryFrom for SpQuery { - type Error = ParserError; - - fn try_from(value: Query) -> Result { - Ok(value.inner) - } -}