HBase
  1. HBase
  2. HBASE-2000 Coprocessors
  3. HBASE-1002

Coprocessors: Support small query language as filter on server side

    Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Minor 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.

        Issue Links

          Activity

          Andrew Purtell made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]
          Todd Lipcon made changes -
          Link This issue is related to HBASE-2396 [ HBASE-2396 ]
          Andrew Purtell made changes -
          Summary Small query language for filters Coprocessors: Support small query language as filter on server side
          Andrew Purtell made changes -
          Parent HBASE-2000 [ 12441373 ]
          Issue Type Improvement [ 4 ] Sub-task [ 7 ]
          Andrew Purtell made changes -
          Link This issue is part of HBASE-2000 [ HBASE-2000 ]
          Andrew Purtell made changes -
          Link This issue is part of HBASE-2000 [ HBASE-2000 ]
          Andrew Purtell made changes -
          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.

          Can also be implemented using JRuby snippets sent to the regionserver for execution, but this has troublesome security implications.
          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:

          {code}
          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\""));
          // ...
          {code}

          or even something like

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

          Can also be implemented using JRuby snippets sent to the regionserver for execution, but this has troublesome security implications.
          Andrew Purtell made changes -
          Field Original Value New Value
          Link This issue is related to HBASE-1696 [ HBASE-1696 ]
          Andrew Purtell created issue -

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development