1. A computer implemented method for eliminating redundancy when generating intermediate representation code, comprising: traversing, by at least one processor, a query execution plan; for at least one operator in the query execution plan, determining, by the at least one processor, whether the operator is derived from a parent class operator; determining that the operator is derived from the parent class operator; generating, by the at least one processor, source code for a native access plan using one or more code generator functions corresponding to the parent class operator; casting the operator as a type of the parent class operator; and calling the one or more code generator functions from the casted operator.