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
I have searched the EvaDB issues and found no similar bug report.
Bug
Example home_sales table in sqlite3:
home_sales.saledate home_sales.MA home_sales.type home_sales.bedrooms
0 saledate MA type bedrooms
1 30/09/2007 441854 house 2
2 31/12/2007 441854 house 2
3 31/03/2008 441854 house 2
4 30/06/2008 441854 house 2
.. ... ... ... ...
343 30/09/2018 603281 unit 3
344 31/12/2018 601167 unit 3
345 31/03/2019 605637 unit 3
346 30/06/2019 599339 unit 3
347 30/09/2019 597884 unit 3
When we run the following query in EvaDB:
SELECT * FROM sqlite_date.home_sales;
It crashed with the following error message
Traceback (most recent call last):
File "/home/zxu330/eva/evadb/executor/plan_executor.py", line 178, in execute_plan
yield from output
File "/home/zxu330/eva/evadb/executor/project_executor.py", line 34, in exec
batch = apply_project(batch, self.target_list, self.catalog())
File "/home/zxu330/eva/evadb/executor/executor_utils.py", line 42, in apply_project
batches = [expr.evaluate(batch) for expr in project_list]
File "/home/zxu330/eva/evadb/executor/executor_utils.py", line 42, in <listcomp>
batches = [expr.evaluate(batch) for expr in project_list]
File "/home/zxu330/eva/evadb/expression/tuple_value_expression.py", line 71, in evaluate
return batch.project([self.col_alias])
File "/home/zxu330/eva/evadb/models/storage/batch.py", line 246, in project
assert len(unknown_cols) == 0, unknown_cols
AssertionError: ['home_sales.ma']
As we can see, the binder is looking for column home_sales.ma instead of home_sales.MA.
Environment
No response
Are you willing to submit a PR?
Yes I'd like to help by submitting a PR!
The text was updated successfully, but these errors were encountered:
xzdandy
changed the title
Binder error when external data source has a table with capital column name
Binder error when external data source has a table with uppercase column name
Sep 8, 2023
node.col_alias = "{}.{}".format(table_alias, node.name.lower()) at evadb/binder/statement_binder.py makes the column name to lowercase that caused this issue.
@gaurav274 What is the motivation to turn the column name into lower case in alias instead of keeping it as original?
Search before asking
Bug
Example home_sales table in sqlite3:
When we run the following query in EvaDB:
It crashed with the following error message
As we can see, the binder is looking for column
home_sales.ma
instead ofhome_sales.MA
.Environment
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: