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

Add support open command #514

Closed
wants to merge 8 commits into from
Closed

Add support open command #514

wants to merge 8 commits into from

Conversation

jiashenC
Copy link
Member

@jiashenC jiashenC commented Dec 5, 2022

Currently support open jpeg image and return a numpy array for it.

@gaurav274
Copy link
Member

How will we use it in a query?

@jiashenC
Copy link
Member Author

jiashenC commented Dec 5, 2022

How will we use it in a query?

@gaurav274 I think it can be just embedded in any statement that needs to get a numpy array from the source image (as we discussed here #478).

SELECT id, data FROM table WHERE similarity(OPEN('../path/to/img.jpg'), data, FeatureExtractor) TOP 5;

@gaurav274
Copy link
Member

Yes, how will the query execution plan look like for this example? Since open is an operator and similarity will be part of an expression. We might have to implement open as an expression. What do you think? @xzdandy

Copy link
Collaborator

@xzdandy xzdandy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My assumption is that '../path/to/img.jpg' locates on the client side (i.e., not server, otherwise we will use the load command to load the image?)
Than this logic should be at the client library where, for example, we turn this image into a base64 encoded string and the expression at the server side decodes it.

@gaurav274
Copy link
Member

My assumption is that '../path/to/img.jpg' locates on the client side (i.e., not server, otherwise we will use the load command to load the image?) Than this logic should be at the client library where, for example, we turn this image into a base64 encoded string and the expression at the server side decodes it.

We assume it is on the server side and the user does not want to use an existing file. In theory, we can replace open with a select query but not for now.

@jiashenC
Copy link
Member Author

jiashenC commented Dec 7, 2022

Decide to implement open as functional expression after discussion.

@jiashenC jiashenC closed this Dec 7, 2022
@jiashenC jiashenC deleted the open-command branch December 16, 2022 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants