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

update test for new example table #165

Merged
merged 4 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/extension_upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
test:
name: Upgrade Test
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
services:
vector-serve:
image: quay.io/tembo/vector-serve:latest
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ Alternatively, `schedule => 'realtime` creates triggers on the source table and
Statements below would will result in new embeddings being generated either immediately (`schedule => 'realtime'`) or within the cron schedule set in the `schedule` parameter.

```sql
INSERT INTO products (product_id, product_name, description)
VALUES (12345, 'pizza', 'dish of Italian origin consisting of a flattened disk of bread');
INSERT INTO products (product_id, product_name, description, product_category, price)
VALUES (12345, 'pizza', 'dish of Italian origin consisting of a flattened disk of bread', 'food', 5.99);

UPDATE products
SET description = 'sling made of fabric, rope, or netting, suspended between two or more points, used for swinging, sleeping, or resting'
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/scheduling.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Alternatively, `schedule => 'realtime` creates triggers on the source table and
Statements below would will result in new embeddings being generated either immediately (`schedule => 'realtime'`) or within the cron schedule set in the `schedule` parameter.

```sql
INSERT INTO products (product_id, product_name, description)
VALUES (12345, 'pizza', 'dish of Italian origin consisting of a flattened disk of bread');
INSERT INTO products (product_id, product_name, description, product_category, price)
VALUES (12345, 'pizza', 'dish of Italian origin consisting of a flattened disk of bread', 'food', 5.99);

UPDATE products
SET description = 'sling made of fabric, rope, or netting, suspended between two or more points, used for swinging, sleeping, or resting'
Expand Down
2 changes: 1 addition & 1 deletion extension/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vectorize"
version = "0.19.0"
version = "0.19.1"
edition = "2021"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion extension/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = "The simplest way to orchestrate vector search on Postgres."
homepage = "https://github.com/tembo-io/pg_vectorize"
documentation = "https://github.com/tembo-io/pg_vectorize"
categories = ["orchestration", "machine_learning"]
version = "0.19.0"
version = "0.19.1"
loadable_libraries = [{ library_name = "vectorize", requires_restart = true }]

[build]
Expand Down
Empty file.
2 changes: 2 additions & 0 deletions extension/sql/vectorize--0.19.0--0.19.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE vectorize.example_products ADD COLUMN product_category TEXT NOT NULL;
ALTER TABLE vectorize.example_products ADD COLUMN price DECIMAL(10, 2) NOT NULL;
16 changes: 8 additions & 8 deletions extension/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ async fn test_realtime_job() {
let random_product_id = rng.gen_range(0..100000);

let insert_query = format!(
"INSERT INTO \"{test_table_name}\"(product_id, product_name, description)
VALUES ({random_product_id}, 'car tester', $$a product for testing car's components$$);"
"INSERT INTO \"{test_table_name}\"(product_id, product_name, description, product_category, price)
VALUES ({random_product_id}, 'car tester', $$a product for testing car's components$$, 'electronics', 10.99);"
);

// insert a new row
Expand Down Expand Up @@ -198,8 +198,8 @@ async fn test_realtime_job() {
let random_product_id = rng.gen_range(0..100000);

let insert_query = format!(
"INSERT INTO \"{test_table_name}\"(product_id, product_name, description)
VALUES ({random_product_id}, 'messy-product', $DELIM$the $$quick brown fox jump's over the lazy dog$DELIM$);"
"INSERT INTO \"{test_table_name}\"(product_id, product_name, description, product_category, price)
VALUES ({random_product_id}, 'messy-product', $DELIM$the $$quick brown fox jump's over the lazy dog$DELIM$, 'product', 10.99);"
);

// insert a new row
Expand Down Expand Up @@ -332,8 +332,8 @@ async fn test_static() {
let random_product_id = rng.gen_range(1..100000);

let insert_query = format!(
"INSERT INTO \"{test_table_name}\"(product_id, product_name, description)
VALUES ({random_product_id}, 'car tester', 'a product for testing cars');"
"INSERT INTO \"{test_table_name}\"(product_id, product_name, description, product_category, price)
VALUES ({random_product_id}, 'car tester', 'a product for testing cars', 'electronics', 10.99);"
);

// insert a new row
Expand Down Expand Up @@ -424,8 +424,8 @@ async fn test_realtime_tabled() {

// insert a new row
let insert_query = format!(
"INSERT INTO \"{test_table_name}\"(product_id, product_name, description)
VALUES ({random_product_id}, 'car tester', 'a product for testing cars');"
"INSERT INTO \"{test_table_name}\"(product_id, product_name, description, product_category, price)
VALUES ({random_product_id}, 'car tester', 'a product for testing cars', 'electronics', 10.99);"
);
let _result = sqlx::query(&insert_query)
.execute(&conn)
Expand Down
Loading