Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-198

Use RexExecutor to evaluate projections and filters


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:



      I was asking on the mailing list if there is a way to use the existing code-generation infrastructure to evaluate projections and filters: https://groups.google.com/forum/#!topic/optiq-dev/-97ONPmDTB4.

      This pull request contains my first approach to change the Rex* components to allow that.

      My change includes the following:

      • Decoupling of code generation, compilation and execution (to allow efficient execution). I therefore introduced the `RexExecutable` class that allows to `reduce()` and `execute()` (given a DataContext)
      • I also changed the `DataContext` interface to allow direct access (using an int-index) to the data (instead of using a HashMap)
      • The most important change is that I introduced a `isExternal`-flag on the `RexInputRef` which indicates that the Ref refers to a variable accessible from the DataContext.

      I'm very happy about any feedback regarding my pull request. I know its certainly not the cleanest approach to implement this feature. But I didn't want to spend too much time working on it without any feedback. (Maybe adding something like a `RexContextRef` is cleaner? (I probably have to shuttle through replacing all InputRefs by RexContextRefs then))

      I know that the pull request is a bit messed up (4 commits and I accidentally changed some code formattings while working with (/fighting against) the checkstyle plugin. Once I got feedback, I'll clean those things up and update the PR (using force push).

      ---------------- Imported from GitHub ----------------
      Url: https://github.com/julianhyde/optiq/pull/198
      Created by: rmetzger
      Created at: Sun Mar 23 16:13:47 CET 2014
      State: closed




            • Assignee:
              github-import GitHub Import
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: