Patent ID: 11966396
Assignee: AMAZON TECHNOLOGIES, INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 0:
1. A computer-implemented method comprising:
receiving a request at a database service, wherein the request includes a structured query language (SQL) query to be performed on at least a portion of a dataset in the database service and wherein the SQL query includes a function reference to a machine learning service to be used in processing the SQL query;
generating a query plan to optimize the SQL query for batch processing, the query plan including a batch mode operator to execute the function reference and an execution context associated with the batch mode operator;
executing the query plan, including the batch mode operator, to execute the function reference and invoke a machine learning function associated with the function reference, the machine learning function:
requesting a plurality of rows using the execution context;
generating, using data associated with the plurality of rows, a machine learning batch request;
sending the machine learning batch request to a machine learning model hosted at an endpoint of a machine learning service to perform inference; and
obtaining a plurality of machine learning responses from the machine learning model, the plurality of machine learning responses stored in the execution context; and
generating a query response based on the machine learning responses.