You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi @maciejb, thanks for reporting this. we improved the SQL parsing in 0.10.4 but I just confirmed the edge case you're reporting. as a temporary workaround, you can remove the trailing ;
(jupysql) eduardo@macbookair dev/jupysql » ipython
Python 3.10.12 (main, Jul 5 2023, 15:02:25) [Clang 14.0.6 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.17.2 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import sql; sql.__version__
Out[1]: '0.10.4'
In [2]: %load_ext sql
<IPython.core.display.HTML object>
In [3]: %sql duckdb://
Connecting to 'duckdb://'
In [4]: %sql select 5 * -1;
UsageError: unrecognized arguments: -1;
In [5]: %sql select 5 * -1
Running query in 'duckdb://'
Out[5]:
+----------+
| (5 * -1) |
+----------+
| -5 |
+----------+
In [6]:
@bryannho this is another edge case of the PR you recently worked on. seems like an easy fix so please tackle it
What happens?
When a space precedes
-
, as in a numerical operation likesomething * -1
, jupysql incorrectly parses the-
to indicate a switch operator.I presume this is the same root issue as #918, but this particular edge case was not addressed in #938
To Reproduce
Run:
OS:
Any
JupySQL Version:
0.10.4
Full Name:
Maciej Bukczynski
Affiliation:
Darkhorse Analytics
The text was updated successfully, but these errors were encountered: