1. A method for compiling data, the method comprising: receiving an input query in a first language; translating the input query to a nested relational algebra (NRA) in the form of a first intermediate representation (IR), wherein the first IR comprises a high-level functional language including algebraic operators; implementing a set of algorithms of the algebraic operators to compile at least some of the first IR into a second IR, wherein the second IR comprises a hybrid language which utilizes a data-flow language and a set of lower-level extensions, and wherein the second IR is optimized by utilizing a set of specific optimizations targeting a part of the second IR that was compiled from a set of algebraic operators of the first IR, wherein the first IR is optimized by utilizing a set of functional optimizations on a set of non-algebra portions of the first IR, wherein the second IR is further optimized by utilizing a set of data-flow optimizations; and compiling at least one of: the first IR and the second IR, into a low-level code.
1. A method for compiling data, the method comprising: receiving an input query in a first language; translating the input query to a nested relational algebra (NRA) in the form of a first intermediate representation (IR), wherein the first IR comprises a high-level functional language including algebraic operators; implementing a set of algorithms of the algebraic operators to compile at least some of the first IR into a second IR, wherein the second IR comprises a hybrid language which utilizes a data-flow language and a set of lower-level extensions, and wherein the second IR is optimized by utilizing a set of specific optimizations targeting a part of the second IR that was compiled from a set of algebraic operators of the first IR, wherein the first IR is optimized by utilizing a set of functional optimizations on a set of non-algebra portions of the first IR, wherein the second IR is further optimized by utilizing a set of data-flow optimizations; and compiling at least one of: the first IR and the second IR, into a low-level code. 4. The method of claim 1 , wherein the first IR is further optimized by utilizing a set of NRA optimizations on a set of algebra portions of the first IR.