Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
b41sh committed Nov 5, 2024
1 parent 019c6d5 commit b531703
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/query/functions/src/scalars/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ pub fn register(registry: &mut FunctionRegistry) {
if let Some(map) = map {
for (k, _) in map.iter() {
if k == key {
ctx.set_error(output.len(), format!("map key `{}` duplicte", key));
ctx.set_error(output.len(), format!("map key `{}` duplicate", key));
output.commit_row();
return;
}
Expand Down Expand Up @@ -415,7 +415,7 @@ pub fn register(registry: &mut FunctionRegistry) {
if let Some(map) = map {
for (k, _) in map.iter() {
if k == key && !update_flag {
ctx.set_error(output.len(), format!("map key `{}` duplicte", key));
ctx.set_error(output.len(), format!("map key `{}` duplicate", key));
output.commit_row();
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/query/functions/tests/it/scalars/testdata/map.txt
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ error:
--> SQL:1:1
|
1 | map_insert({'k1': 'v1', 'k2': 'v2'}, 'k1', 'v10', false)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ map key `'k1'` duplicte while evaluating function `map_insert({'k1':'v1', 'k2':'v2'}, 'k1', 'v10', false)` in expr `map_insert(CAST(map(array('k1', 'k2'), array('v1', 'v2')) AS Map(String, String) NULL), 'k1', 'v10', false)`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ map key `'k1'` duplicate while evaluating function `map_insert({'k1':'v1', 'k2':'v2'}, 'k1', 'v10', false)` in expr `map_insert(CAST(map(array('k1', 'k2'), array('v1', 'v2')) AS Map(String, String) NULL), 'k1', 'v10', false)`



Expand Down Expand Up @@ -969,7 +969,7 @@ error:
--> SQL:1:1
|
1 | map_insert(map([a_col, b_col, c_col], [d_col, e_col, f_col]), 'a', 'v10', false)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ map key `'a'` duplicte while evaluating function `map_insert({'a':'v1', 'd':'v4', 'x':'v6'}, 'a', 'v10', false)` in expr `map_insert(CAST(map(array(a_col, b_col, c_col), array(d_col, e_col, f_col)) AS Map(String, String NULL) NULL), 'a', CAST('v10' AS String NULL), false)`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ map key `'a'` duplicate while evaluating function `map_insert({'a':'v1', 'd':'v4', 'x':'v6'}, 'a', 'v10', false)` in expr `map_insert(CAST(map(array(a_col, b_col, c_col), array(d_col, e_col, f_col)) AS Map(String, String NULL) NULL), 'a', CAST('v10' AS String NULL), false)`



0 comments on commit b531703

Please sign in to comment.