Skip to content
New issue

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

drop table if exists <table_name> throws error when table does not exist. #1375

Open
1 of 2 tasks
aryan-rajoria opened this issue Nov 20, 2023 · 0 comments
Open
1 of 2 tasks

Comments

@aryan-rajoria
Copy link
Collaborator

aryan-rajoria commented Nov 20, 2023

Search before asking

  • I have searched the EvaDB issues and found no similar bug report.

Bug

for query
DROP TABLE IF EXISTS ImageGen

11-20-2023 16:07:43 ERROR [sqlite_storage_engine:sqlite_storage_engine.py:_try_loading_table_via_reflection:0085] No table found with name ImageGen
NoneType: None
11-20-2023 16:07:43 ERROR [sqlite_storage_engine:sqlite_storage_engine.py:drop:0136] Failed to drop the table ImageGen with Exception No table found with name ImageGen
Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/storage/sqlite_storage_engine.py", line 125, in drop
    table_to_remove = self._try_loading_table_via_reflection(table.name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/storage/sqlite_storage_engine.py", line 86, in _try_loading_table_via_reflection
    raise Exception(err_msg)
Exception: No table found with name ImageGen
11-20-2023 16:07:43 ERROR [plan_executor:plan_executor.py:execute_plan:0182] Failed to drop the table ImageGen with Exception No table found with name ImageGen
Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/storage/sqlite_storage_engine.py", line 125, in drop
    table_to_remove = self._try_loading_table_via_reflection(table.name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/storage/sqlite_storage_engine.py", line 86, in _try_loading_table_via_reflection
    raise Exception(err_msg)
Exception: No table found with name ImageGen
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/executor/plan_executor.py", line 178, in execute_plan
    yield from output
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/executor/drop_object_executor.py", line 38, in exec
    yield self._handle_drop_table(self.node.name, self.node.if_exists)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/executor/drop_object_executor.py", line 64, in _handle_drop_table
    storage_engine.drop(table=table_obj)
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/storage/sqlite_storage_engine.py", line 137, in drop
    raise Exception(err_msg)
Exception: Failed to drop the table ImageGen with Exception No table found with name ImageGen
Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/storage/sqlite_storage_engine.py", line 125, in drop
    table_to_remove = self._try_loading_table_via_reflection(table.name)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/storage/sqlite_storage_engine.py", line 86, in _try_loading_table_via_reflection
    raise Exception(err_msg)
Exception: No table found with name ImageGen
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/executor/plan_executor.py", line 178, in execute_plan
    yield from output
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/executor/drop_object_executor.py", line 38, in exec
    yield self._handle_drop_table(self.node.name, self.node.if_exists)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/executor/drop_object_executor.py", line 64, in _handle_drop_table
    storage_engine.drop(table=table_obj)
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/storage/sqlite_storage_engine.py", line 137, in drop
    raise Exception(err_msg)
Exception: Failed to drop the table ImageGen with Exception No table found with name ImageGen
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/workspaces/ImageQuery-App/text-to-image/text-to-image.py", line 74, in <module>
    cursor.query("""DROP TABLE IF EXISTS ImageGen""").execute()
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/interfaces/relational/relation.py", line 141, in execute
    result = execute_statement(self._evadb, self._query_node.copy())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/server/command_handler.py", line 53, in execute_statement
    batch_list = list(output)
                 ^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/evadb/executor/plan_executor.py", line 183, in execute_plan
    raise ExecutorError(e)
evadb.executor.executor_utils.ExecutorError: Failed to drop the table ImageGen with Exception No table found with name ImageGen

Environment

Version: 0.3.9

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant