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

Cannot use ext::ai::search from the query builder #1029

Open
scotttrinh opened this issue May 22, 2024 · 0 comments
Open

Cannot use ext::ai::search from the query builder #1029

scotttrinh opened this issue May 22, 2024 · 0 comments
Assignees
Labels
bug upstream:edgedb Issue produced by changes to EdgeDB/EdgeQL

Comments

@scotttrinh
Copy link
Collaborator

Code

e.ext.ai.search(e.SomeIndexedType, new Float32Array([0.0]));
// or with params, which type checks but does not work at query-build-time
e.params({ searchTerm: e.array(e.float32) }, (params) => e.ext.ai.search(
  e.SomeIndexedType,
  params.searchTerm
));

Error or desired behavior

No function overload found for 'e.ext.ai.search()' with args: Element: default::Post (Many), Element: arraystd::float32 (One)

Digging in here, it seems that in our functionality that compares the argument type to the function type definition, we end up casting the std::float32 to std::number and then comparing against std::float32 (which is false), and we are not generating an implicit cast map entry between std::float32 and std::number so that comparison is also returning false.

Versions (please complete the following information):

  • EdgeDB version (e.g. 2.0): 5.3
  • EdgeDB CLI version (e.g. 2.0): 5.2.0
  • edgedb-js version (e.g. 0.20.10;): 1.5.7
  • @edgedb/generate version (e.g. 0.0.7;): 0.5.3
@scotttrinh scotttrinh added bug upstream:edgedb Issue produced by changes to EdgeDB/EdgeQL labels May 22, 2024
@scotttrinh scotttrinh self-assigned this May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug upstream:edgedb Issue produced by changes to EdgeDB/EdgeQL
Projects
None yet
Development

No branches or pull requests

1 participant