Skip to content

Commit e2882f3

Browse files
committed
fix: code formatting cleanup
1 parent 4f7d487 commit e2882f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/query/ast/src/parser/error_suggestion.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ fn calculate_similarity(input_tokens: &[&str], pattern: &str) -> f64 {
183183
let input_len = input_token.len() as f64;
184184
let pattern_len = pattern_token.len() as f64;
185185
let prefix_ratio = input_len / pattern_len;
186-
186+
187187
// Only give good scores for meaningful prefixes (at least 3 chars or >50% of word)
188188
if input_len >= 3.0 || prefix_ratio > 0.5 {
189189
total_score += 1.5 + prefix_ratio * 1.0; // Max 2.5, always < 3.0 exact match
@@ -335,9 +335,9 @@ mod tests {
335335

336336
#[test]
337337
fn test_prefix_matching_accuracy() {
338-
// "show tab" should suggest table-related commands, not random ones
338+
// "show tab" should suggest table-related commands, not random ones
339339
let result = suggest_correction("show tab").unwrap();
340-
// Should prioritize table-related suggestions
340+
// Should prioritize table-related suggestions
341341
assert_eq!(
342342
result,
343343
"Did you mean `SHOW TABLE FUNCTIONS` or `SHOW TABLES`?".to_string()

0 commit comments

Comments
 (0)