Repository: duckdb/duckdb (2026-06-30T20:44:50Z)

Issue:
Typo in UNNEST() usage error message
### What happens?

Typo: Incorrectly calling `UNNEST()` (e.g. with no arguments) raises the error message "UNNEST() requires at **lease** one argument", instead of "at **least**".

### To Reproduce

Query (CLI):
```
SELECT unnest();
```
Error message:
```
Binder Error:
UNNEST() requires at lease one argument

LINE 1: SELECT unnest();
               ^
```

### OS:

macOS, aarch64

### DuckDB Version:

v1.5.3

### DuckDB Client:

CLI

### Hardware:

_No response_

### Full Name:

Thomas Kirz

### Affiliation:

TU Wien – CD Lab Digital Twin assisted AI for sustainable RAN

### Did you include all relevant configuration (e.g., CPU architecture, Linux distribution) to reproduce the issue?

- [x] Yes, I have

### Did you include all code required to reproduce the issue?

- [x] Yes, I have

### Did you include all relevant data sets for reproducing the issue?

Not applicable - the reproduction does not require a data set


Discussion:
hey, nice find!!!

I tracked the typo to line number `72` of `src/planner/binder/expression/bind_unnest_expression.cpp`
```cpp
71  if (function.GetArguments().empty()) {
72      return BindResult(BinderException(function, "UNNEST() requires at lease one argument"));
73  }
```

will send a PR addressing this and the related test cases in:
- `test/sql/types/list/recursive_unnest.test`
- `test/sql/types/nested/list/test_nested_list.test`



Patch:
diff --git a/src/planner/binder/expression/bind_unnest_expression.cpp b/src/planner/binder/expression/bind_unnest_expression.cpp
index 3962f0283c10..b98961801d78 100644
--- a/src/planner/binder/expression/bind_unnest_expression.cpp
+++ b/src/planner/binder/expression/bind_unnest_expression.cpp
@@ -69,7 +69,7 @@ BindResult SelectBinder::BindUnnest(FunctionExpression &function, idx_t depth, b
 
 	ErrorData error;
 	if (function.GetArguments().empty()) {
-		return BindResult(BinderException(function, "UNNEST() requires at lease one argument"));
+		return BindResult(BinderException(function, "UNNEST() requires at least one argument"));
 	}
 	if (inside_window || inside_aggregate || inside_try) {
 		return BindResult(BinderException(function, UnsupportedUnnestMessage()));


Test patch:
diff --git a/test/sql/types/list/recursive_unnest.test b/test/sql/types/list/recursive_unnest.test
index c579718fcc40..62de0f377c24 100644
--- a/test/sql/types/list/recursive_unnest.test
+++ b/test/sql/types/list/recursive_unnest.test
@@ -108,7 +108,7 @@ Nested UNNEST calls are not supported
 statement error
 SELECT UNNEST();
 ----
-requires at lease one argument
+requires at least one argument
 
 statement error
 SELECT UNNEST([1, 2, 3], 'hello');
diff --git a/test/sql/types/nested/list/test_nested_list.test b/test/sql/types/nested/list/test_nested_list.test
index e07a83a138e9..bbfb505e3312 100644
--- a/test/sql/types/nested/list/test_nested_list.test
+++ b/test/sql/types/nested/list/test_nested_list.test
@@ -274,7 +274,7 @@ SELECT g, UNNEST(g) u FROM (SELECT g, LIST(e) l FROM list_data GROUP BY g) u1
 statement error
 SELECT g, UNNEST() u FROM (SELECT g, LIST(e) l FROM list_data GROUP BY g) u1
 ----
-<REGEX>:.*Binder Error.*requires at lease one argument.*
+<REGEX>:.*Binder Error.*requires at least one argument.*
 
 statement error
 SELECT UNNEST(42)
@@ -284,7 +284,7 @@ SELECT UNNEST(42)
 statement error
 SELECT UNNEST()
 ----
-<REGEX>:.*Binder Error.*requires at lease one argument.*
+<REGEX>:.*Binder Error.*requires at least one argument.*
 
 statement error
 SELECT UNNEST(42) from list_data
@@ -294,9 +294,9 @@ SELECT UNNEST(42) from list_data
 statement error
 SELECT UNNEST() from list_data
 ----
-<REGEX>:.*Binder Error.*requires at lease one argument.*
+<REGEX>:.*Binder Error.*requires at least one argument.*
 
 statement error
 SELECT g FROM (SELECT g, LIST(e) l FROM list_data GROUP BY g) u1 where UNNEST(l) > 42
 ----
-<REGEX>:.*Binder Error.*UNNEST not supported here.*
\ No newline at end of file
+<REGEX>:.*Binder Error.*UNNEST not supported here.*