Abstract:
The present invention discloses a method for executing an SQL operator on compressed data chunk. The method comprising the step of: receiving SQL operator, accessing compressed data chunk blocks, receive e full set of derivatives of the compression scheme, check compression rules based on the compression scheme and relevant operator for approving SQL operation on compressed data and in case of approval applying respective SQL operator on relevant compressed data chunks.

Description:
BACKGROUND 
     Technical Field 
       [0001]    The present invention relates generally to method for Executing SQL Basic Operators on Compressed Data without Decompression Process. 
       BRIEF SUMMARY 
       [0002]    The present invention discloses a method for executing an SQL operator on compressed data chunk. The method comprising the step of: receiving SQL operator, accessing compressed data chunk blocks, receive e full set of derivatives of the compression scheme, check compression rules based on the compression scheme and relevant operator for approving SQL operation on compressed data and in case of approval applying respective SQL operator on relevant compressed data chunks. 
         [0003]    The present invention discloses a method for executing an SQL operator on compressed data chunk using at least one HWA. The method comprising the step of: receiving SQL operator, accessing compressed data chunk blocks, receive full set of derivatives of the compression scheme, check compression rules based on the compression scheme and relevant operator for approving SQL operation on compressed data, wherein the compression scheme is at least one of FOR scheme or BWT scheme, and in case of approval applying respective SQL operator utilizing multiple threads of HWA unit on relevant compressed data chunks. 
         [0004]    According to some embodiments of the present invention the SQL operator is approved incase each uncompressed data unit is an algebraic transformation of according to single offset value. 
         [0005]    According to some embodiments of the present invention the operator is sort operation and the sort operation is applied directly on the compressed data. 
         [0006]    According to some embodiments of the present invention the operator is merge operation, wherein before merge operation is applied, is preformed offset alignment of all compressed chunks utilizing multiple threads of at least one HWA unit based on vector/super-scalar architecture, applying the merge on the aligned compressed chunk. 
         [0007]    According to some embodiments of the present invention the operator is join operation, wherein before join operation is applied, is performed an algebraic transformation by recalculating offset values of the relevant data chunks utilizing multiple threads of at least one HWA unit based on vector/super-scalar architecture, applying the join operation on the transformed data of the relevant data chunk. 
         [0008]    According to some embodiments of the present invention the operator is reduce operation, wherein the reduce operator is approved if reduce operator is obeying the commutative property, applying the reduce operation on the transformed data of the relevant data chunk. 
         [0009]    According to some embodiments of the present invention the operator is hash function, wherein the reduce operator is approved if hash function is injective not only for original values but also for result values, applying hash function on compressed data for mapping compressed data unit through using hash function. 
         [0010]    According to some embodiments of the present invention the SQL operators are applied at least partly while the data is uncompressed, wherein the part of the data chunks are uncompressed sequentially one after the other, wherein the operators are applied on the already decompressed parts. 
         [0011]    According to some embodiments of the present invention the compression scheme is BWT, wherein the decompression process apply multiple threads for analyzing multiple index rows of the BWT result string, enabling to provide partial decompression results through the compression process. 
         [0012]    The present invention discloses a system for executing an SQL operator on compressed data chunk using at least one HWA. The system comprised of: a database of clustered compressed data chunks including compression scheme, at least one HWA unit, at least one CPU unit, SQL operators module for receiving SQL operator, accessing compressed data chunk blocks, receiving full set of derivatives of the compression scheme, check compression rules based on the compression scheme and relevant operator for approving SQL operation on compressed data, wherein the compression scheme is at least one of FOR scheme or BWT scheme; and in case of approval applying respective SQL operator utilizing multiple threads of HWA unit on relevant compressed data chunks. 
         [0013]    These, additional, and/or other aspects and/or advantages of the present invention are: set forth in the detailed description which follows; possibly inferable from the detailed description; and/or learnable by practice of the present invention. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0014]    The present invention will be more readily understood from the detailed description of embodiments thereof made in conjunction with the accompanying drawings of which: 
           [0015]      FIG. 1  illustrates a block diagram showing the entities and modules involved in processing user SQL operators on compressed data, according to some embodiments of the invention. 
           [0016]      FIG. 2  is a flow diagram of SQL operators module processing, according to some embodiments of the invention; 
           [0017]      FIG. 3  is a flow diagram the joint operator processing, according to some embodiments of the invention; 
           [0018]      FIG. 4  is a flow diagram of the hash operator processing, according to some embodiments of the invention; 
           [0019]      FIG. 5  is a flow diagram of the sort operator processing, according to some embodiments of the invention; 
           [0020]      FIG. 6  is a flow diagram of the merge operator processing, according to some embodiments of the invention; 
           [0021]      FIG. 7  is a flow diagram of the reduce operator processing, according to some embodiments of the invention; 
           [0022]      FIG. 8  is a flow diagram of the inverse BWT decompression scheme processing, according to some embodiments of the invention; and 
           [0023]      FIG. 9  is an example of created matrix to be used for inverse BWT decompression scheme processing, according to some embodiments of the invention; 
       
    
    
     DETAILED DESCRIPTION 
       [0024]    Before explaining at least one embodiment of the invention in detail, it is to be understood that the invention is not limited in its application to the details of construction and the arrangement of the components set forth in the following description or illustrated in the drawings. The invention is applicable to other embodiments or of being practiced or carried out in various ways. Also, it is to be understood that the phraseology and terminology employed herein is for the purpose of description and should not be regarded as limiting. 
         [0025]    The term “HWA (HardWare Accelerator):” as used herein in this application, is defined as any hardware that connected to main Central Processing Unit (CPU) through a Peripheral Component Interconnect (PCI) bus and encompasses a multiple computational cores inside. Example: GPGPUs (with 1000s of cores), Intel MICs (with 10s of cores). 
         [0026]    In normal compression scheme the compression of data unit of size S0 is transformed into another data unit of constant and predefined size S1 (S0&gt;S1) according to predefined full set of derivatives of this compression scheme. 
         [0027]    The term “Derivatives” as used herein in this application, is defined as plurality of algebraic operations applied on data units for decompressing data container consisting of plurality compressed data units. Example: FOR (Frame Of Reference) Compression, derivatives: 
         [0028]    pFOR (Patched FOR), pFORd (patched FOR on Deltas) 
         [0029]    Frame of Reference (FOR): FOR determines the range of possible values in a block, called a frame, and maps each value into this range by storing just enough bits to distinguish between the values. 
         [0030]    The term “SQL: Structured Query Language” as used herein in this application, is defined as SQL is a variant of DSL. It is also transformed to set of Map-Reduce operators to be executed by MRF, exactly as DSL. Example: Apache Hive SQL dialect called HQL. 
         [0031]    Patched Frame Of Reference (PFOR) 
         [0032]    PFOR is an extension of FOR that is less vulnerable to outliers in the value distribution. 
         [0033]    PFOR stores outliers as exceptions such that the frame of reference [0; max] is greatly reduce. 
         [0034]    Delta encoding technique in compression scheme stores the difference between the previous integer and the current one in the uncompressed string, instead of storing the original string integer. This allows encoding an ordered list of integers using smaller number of characters, which can be encoded in fewer bits. 
         [0035]    The term “BWT (Burrows-Wheeler transform)” as used herein in this application, is defined as Compression technique which identifies repeated patterns in the data and encoding the duplications more compactly by rearranging the data character string into sequences having similar characters. 
         [0036]      FIG. 1  illustrates a block diagram showing the entities and modules involved in processing user SQL operator on compressed data chunks, according to some embodiments of the invention. A user  10  initiates an SQL query ( 11 ), which is sent to the SQL operator module ( 18 ). The SQL operator run at least one operator of the query on the compressed Data chunk blocks stored on the DBMS using HWA ( 20 ) or the CPU unit  22 . Such process eliminates the need to uncompressed at least part of the data chunks on runtime, hence, accelerating the processing of the operators. 
         [0037]      FIG. 2  is a flow diagram SQL operator module processing, according to some embodiments of the invention. The module access multiple compressed data chunk blocks stored on a DBRM ( 202 ) and receives a full set of derivatives of the compression scheme ( 204 ). The SQL operators to be applied are identified by checking the user query ( 206 ). At the next step are examined compression rules which are relevant for each operator ( 208 ). The rules determine if it&#39;s possible to apply the determined operator without decompressing the data chunks. Examples of the rules are detailed bellow for each type of operator. In case of approval the respective operator is applied directly on the compressed data chunks or on algebraic transformation, which is relevant for the specific operator and compression scheme ( 210 ). 
         [0038]      FIG. 3  is a flow diagram of a joint operator processing, according to some embodiments of the invention. 
         [0039]    Before performing the joint operation, the compression scheme is examined to check each uncompressed data units is an algebraic transformation of compressed data according to single offset value ( 302 ). If yes algebraic transformation is applied on the compressed data chunks by recalculating offset values of the relevant data chunks ( 304 ). 
         [0040]    E.g. of pFORd scheme: only deltas between integers of the string are collected, requiring to change offsets to have a common value and recalculate the deltas accordingly. This recalculating process is an algebraic transformation and could be performed by each execution unit in vector/super-scalar architecture. 
         [0041]    At the next step is performed Join operation on the transformed data of the relevant compressed data chunks ( 306 ). Join may include finding intersection or non-intersected area. The advantage is of applying JON operation on transformed data unit not requiring to decompress the data chunk in real time, is reducing memory consumption throughout the process. 
         [0042]      FIG. 4  is a flow diagram of the hash operator processing, according to some embodiments of the invention. In most cases hash operation on compressed data is not possible. 
         [0043]    In case the hash function is injective not only for original values but also for result values the HASH function can be applied on the uncompressed data chunks by mapping compressed data unit through unmodified hash function ( 404 ). 
         [0044]    If hashing process is used for JON or Reducing as follow-up operations, an algebraic transformation on compressed data units can be optionally performed as mentioned above ( FIG. 4 ) (an algebraic transformation of compressed data according to single offset value). In general case each compressed unit must be decompressed before hashing operation. 
         [0045]      FIG. 5  is a flow diagram of the sort operator processing, according to some embodiments of the invention; 
         [0046]    Before performing the sort operation the compression scheme is examined to check if each uncompressed data units is an algebraic transformation of compressed data unit according to single offset value ( 502 ). 
         [0047]    At the next step the sort operation is applied on the compressed data units on the relevant data chunk units ( 504 ) 
         [0048]      FIG. 6  is a flow diagram of the merge operator processing according to some embodiments of the invention. 
         [0049]    Before performing the merge operation the compression scheme is examined to check if each uncompressed data unit is an algebraic transformation of compressed data unit according to a single offset value ( 602 ). If yes, algebraic transformation is applied on the compressed data chunks by recalculating offset values of the relevant data chunks ( 604 ). At the next step the merge operation is applied on the transformed data of the relevant compressed data chunks ( 606 ). 
         [0050]      FIG. 7  is a flow diagram of the reduce operator processing, according to some embodiments of the invention; 
         [0051]    In case the reduce operator is obeying the commutative property ( 704 ), check if according to the compression scheme each uncompressed data units is an algebraic transformation of a single offset value ( 708 ). If yes, perform reduce operation on directly on the compressed data ( 710 ). 
         [0052]      FIG. 8  is a flow diagram of the inverse BWT decompression scheme processing, according to some embodiments of the invention. 
         [0053]    Based on received result string OF BWT compression process, define two index vectors of BWT result string: first index according to order of received result string from the BWT process and a second index according to alphabetic order (step  802 ). A third vector define an indicator (0,1) for each, if a row take place in the a shifting process and described below. At the first step a single row is indicated (receiving the value of 1) according to the index integer i that represents the position of the original input (received from the BWT compression process), the selected row is shifted to the top (step  804 ). At the end of this definition process is created a matrix including the indication vector, first index column, the string result column, the second index and results string in alphabetic order (see  FIG. 9 ). 
         [0054]    At each phase of the algorithm is preformed a simultaneous shifting of rows, in cycled manner of one column of the matrix, shifting only of rows which are indicated by the indicator vector, the shifting is performed by multiple threads of HWA units, till at least one value of the first index is equal to one value in the second index in the preceding row (step  806 ). 
         [0055]    At the end of each phase, the algorithm checks, if all values of the first index values are equal to values of the second index in the preceding rows (step  808 ). If, yes the algorithm has ended and the order of string at the third/fifth column is original string before compression (step  812 ). 
         [0056]    If no, updating indication vector, for all rows, where the value of the first index is equal to one value in the second index in the preceding row, set the value to 1 (step  810 ) and switch the column to be shifted (step  814 ). 
         [0057]    The SQL operators can be processed on indicated rows while the decompression is under process, thus accelerating the query processing. 
         [0058]    In the above description, an embodiment is an example or implementation of the invention. The various appearances of “one embodiment”, “an embodiment” or “some embodiments” do not necessarily all refer to the same embodiments. 
         [0059]    Although various features of the invention may be described in the context of a single embodiment, the features may also be provided separately or in any suitable combination. Conversely, although the invention may be described herein in the context of separate embodiments for clarity, the invention may also be implemented in a single embodiment. Furthermore, it is to be understood that the invention can be carried out or practiced in various ways and that the invention can be implemented in embodiments other than the ones outlined in the description above. 
         [0060]    The invention is not limited to those diagrams or to the corresponding descriptions. For example, flow need not move through each illustrated box or state, or in exactly the same order as illustrated and described. 
         [0061]    Meanings of technical and scientific terms used herein are to be commonly understood as by one of ordinary skill in the art to which the invention belongs, unless otherwise defined.