1. A non-transitory computer-readable medium storing instructions, which when executed by a computer cause the computer to: receive a database query; retrieve a query execution plan, including a parent operator and one or more descendent operators, corresponding to the database query; determine whether the parent operator and the one or more descendent operators include at least one loop; when both the parent operator and the one or more descendent operators include at least one loop, define consume points for the at least one loop; and merge the parent operator and the one or more descendent operators based on consume point types to generate native access plan source code.