-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUG] improve error reporting for multistatement sql (#2916)
Called it a bug because the error is confusing, this fixes error behavior of multistatement sql. Before: ```py daft.sql('''SELECT * FROM df; SELECT count(*) FROM df''', cat) ``` results in this error: ```py daft.exceptions.InvalidSQLException: Unsupported SQL: 'SELECT * FROM df' ``` but of course that SQL is supported! With this change, error becomes: ```py daft.exceptions.InvalidSQLException: Unsupported SQL: 'Only exactly one SQL statement allowed, found 2' ``` which I believe is at least currently correct, and any future support of multiple statements would have to touch this area of code anyway.
- Loading branch information
1 parent
ab6d98d
commit 2935abd
Showing
2 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters