We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Circle ci. Looks like the failure can be relevant to the lower case column name change.
=================================== FAILURES =================================== ______________ NativeExecutorTest.test_should_run_query_in_mysql _______________ self = Index(['name', 'Age', 'comment'], dtype='object'), key = 'age' def get_loc(self, key): """ Get integer location, slice or boolean mask for requested label. Parameters ---------- key : label Returns ------- int if unique index, slice if monotonic index, else mask Examples -------- >>> unique_index = pd.Index(list('abc')) >>> unique_index.get_loc('b') 1 >>> monotonic_index = pd.Index(list('abbc')) >>> monotonic_index.get_loc('b') slice(1, 3, None) >>> non_monotonic_index = pd.Index(list('abcb')) >>> non_monotonic_index.get_loc('b') array([False, True, False, True]) """ casted_key = self._maybe_cast_indexer(key) try: > return self._engine.get_loc(casted_key) test_evadb/lib/python3.10/site-packages/pandas/core/indexes/base.py:3790: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ index.pyx:152: in pandas._libs.index.IndexEngine.get_loc ??? index.pyx:181: in pandas._libs.index.IndexEngine.get_loc ??? pandas/_libs/hashtable_class_helper.pxi:7080: in pandas._libs.hashtable.PyObjectHashTable.get_item ??? _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E KeyError: 'age' pandas/_libs/hashtable_class_helper.pxi:7088: KeyError The above exception was the direct cause of the following exception: self = <test_native_executor.NativeExecutorTest testMethod=test_should_run_query_in_mysql> def test_should_run_query_in_mysql(self): # Create database. params = { "user": "eva", "password": "password", "host": "localhost", "port": "3306", "database": "evadb", } query = f"""CREATE DATABASE test_data_source WITH ENGINE = "mysql", PARAMETERS = {params};""" execute_query_fetch_all(self.evadb, query) # Test executions. > self._execute_native_query() test/third_party_tests/test_native_executor.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/third_party_tests/test_native_executor.py:117: in _execute_native_query self.assertEqual(res_batch.frames["age"][0], 1) test_evadb/lib/python3.10/site-packages/pandas/core/frame.py:3896: in __getitem__ indexer = self.columns.get_loc(key) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Index(['name', 'Age', 'comment'], dtype='object'), key = 'age' def get_loc(self, key): """ Get integer location, slice or boolean mask for requested label. Parameters ---------- key : label Returns ------- int if unique index, slice if monotonic index, else mask Examples -------- >>> unique_index = pd.Index(list('abc')) >>> unique_index.get_loc('b') 1 >>> monotonic_index = pd.Index(list('abbc')) >>> monotonic_index.get_loc('b') slice(1, 3, None) >>> non_monotonic_index = pd.Index(list('abcb')) >>> non_monotonic_index.get_loc('b') array([False, True, False, True]) """ casted_key = self._maybe_cast_indexer(key) try: return self._engine.get_loc(casted_key) except KeyError as err: if isinstance(casted_key, slice) or ( isinstance(casted_key, abc.Iterable) and any(isinstance(x, slice) for x in casted_key) ): raise InvalidIndexError(key) > raise KeyError(key) from err E KeyError: 'age' test_evadb/lib/python3.10/site-packages/pandas/core/indexes/base.py:3797: KeyError
No response
The text was updated successfully, but these errors were encountered:
I'll look into it. Seems like an issue related to binder changes.
Sorry, something went wrong.
I accidentally created an upper-case column name (https://github.com/georgia-tech-db/evadb/blob/aa8cc0e7486a3392c5c70f50ea215d2349f55b43/test/third_party_tests/test_native_executor.py#L41C29-L41C29).
Postgres columns are not case-sensitive unless it is wrapped in double quotes (https://stackoverflow.com/questions/20878932/are-postgresql-column-names-case-sensitive).
MySQL columns are case-sensitive instead (https://stackoverflow.com/questions/2009005/are-column-and-table-name-case-sensitive-in-mysql).
I think now our binder inherits the case from the underlying database.
Fixed.
jiashenC
gaurav274
Successfully merging a pull request may close this issue.
Search before asking
Bug
Circle ci. Looks like the failure can be relevant to the lower case column name change.
Environment
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: