Skip to content

Commit c886ce3

Browse files
authored
trim leading/trailing whitespace (#74)
* trim leading/trailing whitespace * bump ver * add missing migration
1 parent 7ea5d86 commit c886ce3

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "vectorize"
3-
version = "0.12.0"
3+
version = "0.12.1"
44
edition = "2021"
55
publish = false
66

Trunk.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description = "The simplest way to orchestrate vector search on Postgres."
66
homepage = "https://github.com/tembo-io/pg_vectorize"
77
documentation = "https://github.com/tembo-io/pg_vectorize"
88
categories = ["orchestration", "machine_learning"]
9-
version = "0.12.0"
9+
version = "0.12.1"
1010

1111
[build]
1212
postgres_version = "15"

sql/vectorize--0.12.0--0.12.1.sql

Whitespace-only changes.

src/executor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ pub async fn get_new_updates(
248248
let token_estimate = bpe.encode_with_special_tokens(&ipt).len() as i32;
249249
new_inputs.push(Inputs {
250250
record_id: r.get("record_id"),
251-
inputs: ipt,
251+
inputs: ipt.trim().to_owned(),
252252
token_estimate,
253253
})
254254
}

src/job.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn _handle_table_update(job_name: &str, record_ids: Vec<String>, inputs: Vec<Str
3333
let token_estimate = bpe.encode_with_special_tokens(&input).len() as i32;
3434
new_inputs.push(Inputs {
3535
record_id,
36-
inputs: input,
36+
inputs: input.trim().to_owned(),
3737
token_estimate,
3838
})
3939
}
@@ -138,7 +138,7 @@ pub fn initalize_table_job(
138138
record_id: row["record_id"]
139139
.value::<String>()?
140140
.expect("record_id is null"),
141-
inputs: ipt,
141+
inputs: ipt.trim().to_owned(),
142142
token_estimate,
143143
});
144144
}

0 commit comments

Comments
 (0)