-
Notifications
You must be signed in to change notification settings - Fork 19
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: Add support for pgvector
[NAIVE]
#251
base: main
Are you sure you want to change the base?
Commits on Dec 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for fe92e45 - Browse repository at this point
Copy the full SHA fe92e45View commit details -
test: Add test cases for arrays and objects
In PostgreSQL, all boils down to the `jsonb[]` type, but arrays are reflected as `sqlalchemy.dialects.postgresql.ARRAY` instead of `sqlalchemy.dialects.postgresql.JSONB`. In order to prepare for more advanced type mangling & validation, and to better support databases pretending to be compatible with PostgreSQL, the new test cases exercise arrays with different kinds of inner values, because, on other databases, ARRAYs may need to have uniform content. Along the lines, it adds a `verify_schema` utility function in the spirit of the `verify_data` function, refactored and generalized from the `test_anyof` test case.
Configuration menu - View commit details
-
Copy full SHA for c0d4a89 - Browse repository at this point
Copy the full SHA c0d4a89View commit details -
test: Fix
FATAL: sorry, too many clients already
Dispose the SQLAlchemy engine object after use within test utility functions.
Configuration menu - View commit details
-
Copy full SHA for 8b3ea4f - Browse repository at this point
Copy the full SHA 8b3ea4fView commit details -
test: Fix
FATAL: sorry, too many clients already
Within `BasePostgresSDKTests`, new database connections via SQLAlchemy haven't been closed, and started filling up the connection pool, eventually saturating it.
Configuration menu - View commit details
-
Copy full SHA for a9d1796 - Browse repository at this point
Copy the full SHA a9d1796View commit details -
test: Fix
FATAL: sorry, too many clients already
Dispose the SQLAlchemy engine object after use within `PostgresConnector`.
Configuration menu - View commit details
-
Copy full SHA for 723e1fa - Browse repository at this point
Copy the full SHA 723e1faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e2f6db - Browse repository at this point
Copy the full SHA 9e2f6dbView commit details -
test: Refactor utility functions
verify_data
andverify_schema
By wrapping them into a container class `AssertionHelper`, it is easy to parameterize them, and to provide them to the test functions using a pytest fixture. This way, they are reusable from database adapter implementations which derive from PostgreSQL. The motivation for this is because the metadata column prefix `_sdc` needs to be adjusted for other database systems, as they reject such columns, being reserved for system purposes. In the specific case of CrateDB, it is enough to rename it like `__sdc`. Sad but true.
Configuration menu - View commit details
-
Copy full SHA for 86bb083 - Browse repository at this point
Copy the full SHA 86bb083View commit details -
Configuration menu - View commit details
-
Copy full SHA for f007377 - Browse repository at this point
Copy the full SHA f007377View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb320f1 - Browse repository at this point
Copy the full SHA fb320f1View commit details