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
This error is reproducible as per the instructions provided.
While debugging the issue the error generates from the mindsdb_sql package sqlalchemy_render.py. The following queries were ran to get the query_ast and type(query_ast) in the file mindsdb/api/executor/utilities/sql.pyline 171 and checking the value for t in file mindsdb_sql/render/sqlalchemy_render.pyline: 375
The results are:
Input (Error):
select x.* from mindsdb.models as x
query_ast ------> SELECT * FROM df AS x WHERE `project` = 'mindsdb'
I have added a simple check for the input to verify if it is of type string in sqlalchemy_render.py
#### Line 117 - 123
elif isinstance(t, ast.Identifier):
# sql functions
col = None
if len(t.parts) == 1 and isinstance(t, str):
name = t.parts[0].upper()
if name == 'CURRENT_DATE':
col = sa_fnc.current_date()
which resolves the issue. But a moderator can guide if this is an issue with the library mindsdb_sql and the issue should be moved there or further investigation is required to make the behavior consistent for passing the Star objects with/without alias
Short description of current behavior
When doing query:
SELECT x.* FROM mindsdb.models x;
got exception
SELECT * FROM mindsdb.models x;
is okVideo or screenshots
No response
Expected behavior
No response
How to reproduce the error
do
SELECT x.* FROM mindsdb.models x;
Anything else?
No response
The text was updated successfully, but these errors were encountered: