Skip to content

Commit

Permalink
fix: remove extra preprocess
Browse files Browse the repository at this point in the history
Signed-off-by: usamoi <[email protected]>
  • Loading branch information
usamoi committed Nov 20, 2024
1 parent a1d9f78 commit ce55ed8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/index/am.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ pub unsafe extern "C" fn ambuild(
let vector = unsafe { opfamily.datum_to_vector(*values.add(0), *is_null.add(0)) };
let pointer = unsafe { ctid_to_pointer(ctid.read()) };
if let Some(vector) = vector {
let vector = match opfamily.preprocess(vector.as_borrowed()) {
let vector = match vector {
OwnedVector::Vecf32(x) => x,
OwnedVector::Vecf16(_) => unreachable!(),
OwnedVector::SVecf32(_) => unreachable!(),
Expand Down Expand Up @@ -567,7 +567,7 @@ unsafe fn parallel_build(
let vector = unsafe { opfamily.datum_to_vector(*values.add(0), *is_null.add(0)) };
let pointer = unsafe { ctid_to_pointer(ctid.read()) };
if let Some(vector) = vector {
let vector = match opfamily.preprocess(vector.as_borrowed()) {
let vector = match vector {
OwnedVector::Vecf32(x) => x,
OwnedVector::Vecf16(_) => unreachable!(),
OwnedVector::SVecf32(_) => unreachable!(),
Expand Down Expand Up @@ -662,7 +662,7 @@ pub unsafe extern "C" fn aminsert(
let opfamily = unsafe { am_options::opfamily(index) };
let vector = unsafe { opfamily.datum_to_vector(*values.add(0), *is_null.add(0)) };
if let Some(vector) = vector {
let vector = match opfamily.preprocess(vector.as_borrowed()) {
let vector = match vector {
OwnedVector::Vecf32(x) => x,
OwnedVector::Vecf16(_) => unreachable!(),
OwnedVector::SVecf32(_) => unreachable!(),
Expand Down Expand Up @@ -695,7 +695,7 @@ pub unsafe extern "C" fn aminsert(
let opfamily = unsafe { am_options::opfamily(index) };
let vector = unsafe { opfamily.datum_to_vector(*values.add(0), *is_null.add(0)) };
if let Some(vector) = vector {
let vector = match opfamily.preprocess(vector.as_borrowed()) {
let vector = match vector {
OwnedVector::Vecf32(x) => x,
OwnedVector::Vecf16(_) => unreachable!(),
OwnedVector::SVecf32(_) => unreachable!(),
Expand Down
2 changes: 1 addition & 1 deletion src/index/am_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub fn scan_next(scanner: &mut Scanner, relation: Relation) -> Option<(Pointer,
if let Some((vector, opfamily)) = vector.as_ref() {
let vbase = scan(
relation,
match opfamily.preprocess(vector.as_borrowed()) {
match vector {
OwnedVector::Vecf32(x) => x.slice().to_vec(),
OwnedVector::Vecf16(_) => unreachable!(),
OwnedVector::SVecf32(_) => unreachable!(),
Expand Down

0 comments on commit ce55ed8

Please sign in to comment.