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

feat: integration for pg_handler added #937

Merged
merged 6 commits into from
Aug 19, 2023
Merged

feat: integration for pg_handler added #937

merged 6 commits into from
Aug 19, 2023

Conversation

gaurav274
Copy link
Member

  1. Added Abstract Class for database integrations.
  2. Implemented postgres integration

@jiashenC
Copy link
Member

@gaurav274 Can you give a quick read on this?

@gaurav274
Copy link
Member Author

@gaurav274 Can you give a quick read on this?

LGTM

@@ -0,0 +1,112 @@
# coding=utf-8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is in the same folder as types.py and interface.py, shall we move this to a separate dir

evadb/third_party/databases/handlers/postgres_handler/.....

This would also make it cleaner while adding handlers for other backends

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

evadb/third_party/databases/types.py Outdated Show resolved Hide resolved
evadb/third_party/databases/types.py Outdated Show resolved Hide resolved
# See the License for the specific language governing permissions and
# limitations under the License.
import pandas as pd
import psycopg2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this will be installed by default in circleci since its under a separate header in setup.py

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We need to fix import psycopg2 across the code base. We should only import this if user is creating a postgres database connection.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add dynamic install and import here 106896b.

I will work on another PR to allow testing everything in CI.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -0,0 +1,2 @@
psycopg<=2.9.7
pandas<=2.0.2
Copy link
Collaborator

@xzdandy xzdandy Aug 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we want to have a cap on the version? This very likely leads to version conflicts, given postgres is not installed with the evadb. From my experience with the current setup.py, pip install -e .[dev,some_other_dependency] works, but pip install -e .[dev] and then pip install -e .[some_other_dependency] will print out version conflict warnings/errors, especially when we have version caps on some packages.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Removed it.

@jiashenC jiashenC merged commit 0949abc into master Aug 19, 2023
@jiashenC jiashenC deleted the pg_handler branch August 19, 2023 20:48
@gaurav274 gaurav274 added Feature Request ✨ New feature or request Integrations 🧩 Pull requests that update an integration labels Aug 25, 2023
@gaurav274 gaurav274 added this to the v0.3.2 milestone Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request ✨ New feature or request Integrations 🧩 Pull requests that update an integration
Projects
Development

Successfully merging this pull request may close these issues.

4 participants