Skip to content

Commit

Permalink
chore: fix typo (GreptimeTeam#524)
Browse files Browse the repository at this point in the history
SSebo authored Nov 16, 2022
1 parent 173a8f6 commit 29ad16d
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/common/error/src/format.rs
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ impl<'a, E: ErrorExt + ?Sized> fmt::Debug for DebugFormat<'a, E> {
write!(f, " Caused by: {:?}", source)?;
}
if let Some(backtrace) = self.0.backtrace_opt() {
// Add a newline to seperate causes and backtrace.
// Add a newline to separate causes and backtrace.
write!(f, "\nBacktrace:\n{}", backtrace)?;
}

8 changes: 4 additions & 4 deletions src/servers/src/prometheus.rs
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//! promethues protcol supportings
//! prometheus protocol supportings
use std::cmp::Ordering;
use std::collections::{BTreeMap, HashMap};
use std::hash::{Hash, Hasher};
@@ -77,7 +77,7 @@ pub fn query_to_sql(db: &str, q: &Query) -> Result<(String, String)> {
let value = &m.value;
let m_type =
MatcherType::from_i32(m.r#type).context(error::InvalidPromRemoteRequestSnafu {
msg: format!("invaid LabelMatcher type: {}", m.r#type),
msg: format!("invalid LabelMatcher type: {}", m.r#type),
})?;

match m_type {
@@ -87,11 +87,11 @@ pub fn query_to_sql(db: &str, q: &Query) -> Result<(String, String)> {
MatcherType::Neq => {
conditions.push(format!("{}!='{}'", name, value));
}
// Case senstive regexp match
// Case sensitive regexp match
MatcherType::Re => {
conditions.push(format!("{}~'{}'", name, value));
}
// Case senstive regexp not match
// Case sensitive regexp not match
MatcherType::Nre => {
conditions.push(format!("{}!~'{}'", name, value));
}
2 changes: 1 addition & 1 deletion src/sql/src/parser.rs
Original file line number Diff line number Diff line change
@@ -158,7 +158,7 @@ impl<'a> ParserContext<'a> {
}));
}

// SHOW TABLES [in | FROM] [DATABSE]
// SHOW TABLES [in | FROM] [DATABASE]
Token::Word(w) => match w.keyword {
Keyword::IN | Keyword::FROM => {
self.parser.next_token();

0 comments on commit 29ad16d

Please sign in to comment.