You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Andrew Purtell (JIRA)" <ji...@apache.org> on 2009/07/24 08:28:15 UTC

[jira] Updated: (HBASE-1002) Small query language for filters

     [ https://issues.apache.org/jira/browse/HBASE-1002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Purtell updated HBASE-1002:
----------------------------------

    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:

{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.

  was:
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.


> Small query language for filters
> --------------------------------
>
>                 Key: HBASE-1002
>                 URL: https://issues.apache.org/jira/browse/HBASE-1002
>             Project: Hadoop HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Andrew Purtell
>            Priority: Minor
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.