US 11,797,536 B2
Just-in-time injection in a distributed database
Ashok Anand, Bengaluru (IN); Bhanu Prakash, Karnataka (IN); Amit Prakash, Saratoga, CA (US); and Sanjay Agrawal, Sammamish, WA (US)
Assigned to ThoughtSpot, Inc., Mountain View, CA (US)
Filed by ThoughtSpot, Inc., Sunnyvale, CA (US)
Filed on Apr. 9, 2021, as Appl. No. 17/226,646.
Prior Publication US 2022/0327127 A1, Oct. 13, 2022
Int. Cl. G06F 16/2453 (2019.01); G06F 16/27 (2019.01); G06F 16/242 (2019.01)
CPC G06F 16/24542 (2019.01) [G06F 16/2433 (2019.01); G06F 16/27 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method, comprising:
receiving a data-query at a distributed database, the distributed database comprising a first database instance and a second database instance;
generating, by the first database instance, a query plan for obtaining results data, wherein the query plan comprises a first query execution instruction for transmission to the second database instance;
transmitting, by the first database instance, a request for partial results to the second database instance, wherein the request comprises the first query execution instruction and an indication of override instructions corresponding to the first query execution instruction;
including, by the second database instance, the override instructions in a set of high-level language query instructions,
wherein the high-level language query instructions implement, at least in part, the first query execution instruction of the query plan and do not modify the query plan, and
wherein the override instructions replace default instructions associated with the first query execution instruction of the query plan and wherein the override instructions do not modify the query plan;
performing, by the second database instance, just-in-time compiling on the set of high-level language query instructions to obtain a machine language query for performing the first query execution instruction of the query plan;
executing, at the second database instance, the machine language query to obtain the partial results;
transmitting, by the second database instance, the partial results to the first database instance;
obtaining, by the first database instance, the results data using the partial results; and
outputting the results data.