mindsdb / dfsql

SQL interface to Pandas
GNU General Public License v3.0
51 stars 9 forks source link

Error if selecting column name is 'status' #44

Open StpMax opened 2 years ago

StpMax commented 2 years ago

query:

result_df = dfsql.sql_query(
                    'select name, status from predictors',
                    ds_kwargs={'case_sensitive': False},
                    reduce_output=False,
                    predictors=predictors_df
                )

error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/maxs/dev/mdb/venv38/sources/dfsql/dfsql/__init__.py", line 30, in sql_query
    result = ds.query(sql, reduce_output=reduce_output)
  File "/home/maxs/dev/mdb/venv38/sources/dfsql/dfsql/data_sources/base_data_source.py", line 171, in query
    query = parse_sql(sql)
  File "/home/maxs/dev/mdb/venv38/sources/mindsdb_sql/mindsdb_sql/__init__.py", line 25, in parse_sql
    ast = parser.parse(tokens)
  File "/home/maxs/dev/mdb/venv38/lib/python3.8/site-packages/sly-0.4-py3.8.egg/sly/yacc.py", line 2119, in parse
    tok = self.error(errtoken)
  File "/home/maxs/dev/mdb/venv38/sources/mindsdb_sql/mindsdb_sql/parser/parser.py", line 544, in error
    raise ParsingException(f"Syntax error at token {p.type}: \"{p.value}\"")
mindsdb_sql.exceptions.ParsingException: Syntax error at token STATUS: "status"
CCCCCCCE commented 2 years ago

Can I have a table? In which are you doing the selective status operations?

tomhuds commented 1 year ago

@StpMax can we archive this project? or close issue?