Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-2000 Coprocessors
  3. HBASE-1002

Coprocessors: Support small query language as filter on server side

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Filters
    • Labels:
      None

      Description

      Improve the usability of filters by making them specifiable or executable using a little query language.

      For example:

      col("entry:price") > 3 && (col("entry:name") = "ABC" || col("entry:name") = "XYZ")

      Can be implemented as a little language compiler that takes filter specifications as input and builds the requisite hierarchy of filter API classes and actions as emitted java code.

      Compiler can be a utility class, something like:

      Scan scan = new Scan();
      scan.addFamily(Bytes.toBytes("entry"));
      // ...
      scan.setFilter(Filter.compile("col(\"entry:price\") > 3 && 
      (col(\"entry:name\") =  \"ABC\" || col(\"entry:name\") = \"XYZ\""));
      // ...
      

      or even something like

      Scan scan = Filter.compileScan("col(\"entry:price\") > 3 && 
      (col(\"entry:name\") =  \"ABC\" || col(\"entry:name\") = \"XYZ\""));
      // ...
      

      Can also be implemented using JRuby snippets sent to the regionserver for execution, but this has troublesome security implications.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                apurtell Andrew Purtell
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: