Simplified query language for accessing metadata
AssigneeEMC Corporation
InventorsJeffrey Ira Cohen, Kurt Harriman, Matthew Clark McCline
Life of this patent
Estimating the term…
Abstract
A CaQL API is provided by receiving a query directed to a catalog that includes metadata. A catalog access target is determined based at least in part on one or more of the following: a CaQL keyword which is included in the query, a name of a table in the catalog which is included in the query, or a predicate which is included in the query. A catalog function is generated based at least in part on the CaQL keyword and the catalog function is performed on the catalog access target.
Claims16
A method for providing a catalog query language (CaQL) application programming interface (API), comprising:
- receiving, at a processor which performs the CaQL API, a query associated with performing an operation on a first table in a catalog, wherein the catalog includes metadata;
- using the processor to determine a catalog access target, wherein:
- determination of the catalog access target is based at least in part on one or more of the following:
- a catalog query language (CaQL) keyword which identifies the operation and is included in the query, the name of the first table in the catalog which is included in the query, or a predicate which is included in the query;
- the first table is located in a plurality of locations in the catalog, including two or more of the following:
- a heap, an index, a system table, or a system cache;
- and
- determination of the catalog access target includes selecting, based at least in part on the operation, a location from the plurality of locations such that the selected location includes one and only one of the following:
- the heap, the index, the system table, or the system cache;
- using the processor to determine if there is a preexisting lock on a second table that can be reused for the first table, wherein the first table is different from the second table;
- in the event it is determined that there is a preexisting lock on the second table that can be reused for the first table, using the processor to determine if the strength of the preexisting lock on the second table is sufficient;
- in the event:
- (a) it is determined that there is a preexisting lock on the second table that can be reused for the first table and (b) it is determined that the strength of the preexisting lock on the second table is not sufficient, obtaining a new lock for the first table;
- in the event:
- (1) it is determined that there is a preexisting lock on the second table that can be reused for the first table and (2) it is determined that the strength of the preexisting lock on the second table is sufficient, reusing the preexisting lock on the second table for the first table;
- generating, based at least in part on the CaQL keyword, a catalog function;
- and
- performing the catalog function on the selected location, and wherein
- in the event there is a lock on the second table and the first table depends from the second table, it is determined that there is a preexisting lock on the second table that can be reused for the first table;
- and
- in the event there is a lock on the second table and the first table does not depend from the second table, the lock on the second table does not count as a preexisting lock on the second table that can be reused for the first table.
A system for providing a catalog query language (CaQL) application programming interface (API), comprising:
- a processor;
- and
- a memory coupled with the processor, wherein the memory is configured to provide the processor with instructions which when executed cause the processor to:
- receive, at the processor, a query associated with performing an operation on a first table in a catalog, wherein the catalog includes metadata;
- determine a catalog access target, wherein:
- determination of the catalog access target is based at least in part on one or more of the following:
- a catalog query language (CaQL) keyword which identifies the operation and is included in the query, the name of the first table in the catalog which is included in the query, or a predicate which is included in the query;
- the first table is located in a plurality of locations in the catalog, including two or more of the following:
- a heap, an index, a system table, or a system cache;
- and
- determination of the catalog access target includes selecting, based at least in part on the operation, a location from the plurality of locations such that the selected location includes one and only one of the following:
- the heap, the index, the system table, or the system cache;
- determine if there is a preexisting lock on a second table that can be reused for the first table, wherein the first table is different from the second table;
- in the event it is determined that there is a preexisting lock on the second table that can be reused for the first table, determine if the strength of the preexisting lock on the second table is sufficient;
- in the event:
- (a) it is determined that there is a preexisting lock on the second table that can be reused for the first table and (b) it is determined that the strength of the preexisting lock on the second table is not sufficient, obtain a new lock for the first table;
- in the event:
- (1) it is determined that there is a preexisting lock on the second table that can be reused for the first table and (2) it is determined that the strength of the preexisting lock on the second table is sufficient, reuse the preexisting lock on the second table for the first table;
- generate, based at least in part on the CaQL keyword, a catalog function;
- and
- perform the catalog function on the selected location, and wherein in the event there is a lock on the second table and the first table depends from the second table, it is determined that there is a preexisting lock on the second table that can be reused for the first table;
- and
- in the event there is a lock on the second table and the first table does not depend from the second table, the lock on the second table does not count as a preexisting lock on the second table that can be reused for the first table.
A computer program product for providing a catalog query language (CaQL) application programming interface (API), the computer program product being embodied in a non-transitory computer readable storage medium and comprising computer instructions for:
- receiving, at a processor which performs the CaQL API, a query associated with performing an operation on a first table in a catalog, wherein the catalog includes metadata;
- determining a catalog access target, wherein:
- determination of the catalog access target is based at least in part on one or more of the following:
- a catalog query language (CaQL) keyword which identifies the operation and is included in the query, the name of the first table in the catalog which is included in the query, or a predicate which is included in the query;
- the first table is located in a plurality of locations in the catalog, including two or more of the following:
- a heap, an index, a system table, or a system cache;
- and
- determination of the catalog access target includes selecting, based at least in part on the operation, a location from the plurality of locations such that the selected location includes one and only one of the following:
- the heap, the index, the system table, or the system cache;
- determining if there is a preexisting lock on a second table that can be reused for the first table, wherein the first table is different from the second table;
- in the event it is determined that there is a preexisting lock on the second table that can be reused for the first table, determining if the strength of the preexisting lock on the second table is sufficient;
- in the event:
- (a) it is determined that there is a preexisting lock on the second table that can be reused for the first table and (b) it is determined that the strength of the preexisting lock on the second table is not sufficient, obtaining a new lock for the first table;
- in the event:
- (1) it is determined that there is a preexisting lock on the second table that can be reused for the first table and (2) it is determined that the strength of the preexisting lock on the second table is sufficient, reusing the preexisting lock on the second table for the first table;
- generating, based at least in part on the CaQL keyword, a catalog function;
- and
- performing the catalog function on the selected location, and wherein
- in the event there is a lock on the second table and the first table depends from the second table, it is determined that there is a preexisting lock on the second table that can be reused for the first table;
- and
- in the event there is a lock on the second table and the first table does not depend from the second table, the lock on the second table does not count as a preexisting lock on the second table that can be reused for the first table.
Dependencies are inferred from the claim text.