Skip to content

Commit 55155d7

Browse files
committed
fix whitespace-only expression bug
1 parent ecbebcb commit 55155d7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/duckdb_py/pyrelation.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,9 @@ string DuckDBPyRelation::GenerateExpressionList(const string &function_name, vec
397397
// We parse the input as an expression to validate it.
398398
auto trimmed_input = input[i];
399399
StringUtil::Trim(trimmed_input);
400+
if (trimmed_input.empty()) {
401+
throw ParserException("Invalid column expression: '%s'", input[i]);
402+
}
400403

401404
unique_ptr<ParsedExpression> expression;
402405
try {

0 commit comments

Comments
 (0)