Skip to content

Commit 1f4a95b

Browse files
committed
set threshold to include 0.5
1 parent 97d73b3 commit 1f4a95b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

datafusion/common/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ impl Display for SchemaError {
193193
let field_name = field.name();
194194
if let Some(matched) = valid_fields_names
195195
.iter()
196-
.filter(|str| normalized_levenshtein(str, field_name) > 0.5)
196+
.filter(|str| normalized_levenshtein(str, field_name) >= 0.5)
197197
.collect::<Vec<&String>>()
198198
.first()
199199
{

datafusion/sqllogictest/test_files/identifiers.slt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,16 @@ drop table case_insensitive_test
9090
statement ok
9191
CREATE TABLE test("Column1" string) AS VALUES ('content1');
9292

93-
statement error DataFusion error: Schema error: No field named column1\. Valid fields are test\."Column1"\.
93+
statement error DataFusion error: Schema error: No field named column1\. Did you mean 'test\.Column1'\?\.
9494
SELECT COLumn1 from test
9595

96-
statement error DataFusion error: Schema error: No field named column1\. Valid fields are test\."Column1"\.
96+
statement error DataFusion error: Schema error: No field named column1\. Did you mean 'test\.Column1'\?\.
9797
SELECT Column1 from test
9898

99-
statement error DataFusion error: Schema error: No field named column1\. Valid fields are test\."Column1"\.
99+
statement error DataFusion error: Schema error: No field named column1\. Did you mean 'test\.Column1'\?\.
100100
SELECT column1 from test
101101

102-
statement error DataFusion error: Schema error: No field named column1\. Valid fields are test\."Column1"\.
102+
statement error DataFusion error: Schema error: No field named column1\. Did you mean 'test\.Column1'\?\.
103103
SELECT "column1" from test
104104

105105
statement ok

0 commit comments

Comments
 (0)