1. 29 6月, 2016 1 次提交
  2. 21 6月, 2016 1 次提交
  3. 02 6月, 2016 1 次提交
  4. 24 5月, 2016 1 次提交
  5. 21 5月, 2016 1 次提交
  6. 18 5月, 2016 1 次提交
  7. 11 5月, 2016 1 次提交
    • S
      This commit generates code for code path: ExecVariableList > slot_getattr >... · 7b75d9ea
      Shreedhar Hardikar 提交于
      This commit  generates code for code path: ExecVariableList > slot_getattr > _slot_getsomeattrs > slot_deform_tuple. This code path is executed during scan in simple select queries that do not have a where clause (e.g., select bar from foo;).
      
      For each attribute A in the target list, regular implementation of ExecvariableList retrieves the slot that A comes from and calls slot_getattr. slot_get_attr() will eventually call slot_deform_tuple (through _slot_getsomeattrs), which fetches all yet unread attributes of the slot until the given attribute.
      
      This commit generates the code for the case that all the attributes in target list use the same slot (created during a scan i.e, ecxt_scantuple). Moreover, instead of looping over the target list one at a time, it uses slot_getattr only once, with the largest attribute index from the target list.
      
      If during code generation time, the completion is not possible (e.g., attributes use different slots), then function returns false and codegen manager will be responsible to manage the clean up.
      
      This implementation does not support:
      * Null attributes
      * Variable length attributes
      * Fixed length attributes passed by reference (e.g., uuid)
      If at execution time, we see any of the above types of attributes, we fall back to the regular function.
      
      Moreover, this commit:
      * renames existing "codegen" guc, which is used for initiating llvm libraries, to "init_codegen" (Note: we set this guc in gpconfig),
      * adds guc "codegen", which enables code generation and compilation at query execution time,
      * enhances the existing code generation utilities by adding a function that creates all IR instructions for falling back to regular functions, and
      * removes the existing code that generates the code of a naive slot_deform_tuple, which simply falls back to regular slot_deform_tuple.
      Signed-off-by: NNikos Armenatzoglou <nikos.armenatzoglou@gmail.com>
      7b75d9ea