Skip to content

Commit

Permalink
fix:limit error format
Browse files Browse the repository at this point in the history
  • Loading branch information
paradox0503 authored and roseboy-liu committed Nov 7, 2024
1 parent ce4ee92 commit 21b2303
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion datafusion/core/tests/sqllogictests/test_files/select.slt
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ select * from (select 1 a union all select 2) b order by a limit 1;
1

# select limit clause invalid
statement error DataFusion error: Error during planning: LIMIT must not be negative
statement error DataFusion error: Error during planning: LIMIT format is invalid
select * from (select 1 a union all select 2) b order by a limit -1;

# select limit clause
Expand Down
2 changes: 1 addition & 1 deletion datafusion/sql/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> {
Ok(n as usize)
}
_ => Err(DataFusionError::Plan(
"LIMIT must not be negative".to_string(),
"LIMIT format is invalid".to_string(),
)),
}?;
Some(n)
Expand Down

0 comments on commit 21b2303

Please sign in to comment.