> On April 28, 2014, 8:54 p.m., Jinfeng Ni wrote:
> > contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseFilterBuilder.java,
> >  line 52
> > <https://reviews.apache.org/r/20806/diff/2/?file=570028#file570028line52>
> >
> >     Looks like most of visit... methods have the same behavior. 
> >     
> >     If you extend HBaseFilterBuilder from AbstractExprVisitor, then you 
> > only need override visitUnknow(). In AbstractExprVisitor, by default, all 
> > the visit... methods will call visitUnknow().
> >     
> >     This would simply the code of HBaseFilterBuilder.
> >

Thank you! I was looking for something like that but seems did not look hard 
enough. Will incorporate in the updated patch.


> On April 28, 2014, 8:54 p.m., Jinfeng Ni wrote:
> > contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseFilterBuilder.java,
> >  line 77
> > <https://reviews.apache.org/r/20806/diff/2/?file=570028#file570028line77>
> >
> >     It could throw IOBE to call get(0) or get(1), without checking the 
> > function call's argument number, since the function call could have 0, or 1 
> > arguments. 
> >

Fixed in new patch.


> On April 28, 2014, 8:54 p.m., Jinfeng Ni wrote:
> > contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseFilterBuilder.java,
> >  line 68
> > <https://reviews.apache.org/r/20806/diff/2/?file=570028#file570028line68>
> >
> >     The code assumes the predicate will be in the form of :
> >     row_key = 'value'.
> >     
> >     What about 'value' = row_key? It would be better to transform these two 
> > forms of predicates into "standard" one first, then convert into Hbase 
> > filter.
> >

Is there a standard transformation available or should I need to build one for 
this purpose?


- Aditya


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/20806/#review41678
-----------------------------------------------------------


On April 28, 2014, 7:43 p.m., Aditya Kishore wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20806/
> -----------------------------------------------------------
> 
> (Updated April 28, 2014, 7:43 p.m.)
> 
> 
> Review request for drill, Jinfeng Ni, Steven Phillips, and Timothy Chen.
> 
> 
> Bugs: DRILL-571
>     https://issues.apache.org/jira/browse/DRILL-571
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> This patch adds an Optimizer rule to HBase storage plugin which would 
> transform an HBase scan followed by a logical (==, !=, <, <=, >, >=) filter 
> on the row key into an HBase scan with filter thus minimizing the data 
> transfer and elimination one operation altogether.
> 
> 
> Diffs
> -----
> 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/DrillHBaseConstants.java
>  PRE-CREATION 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseFilterBuilder.java
>  PRE-CREATION 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseGroupScan.java
>  b8b6af4 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBasePushFilterIntoScan.java
>  PRE-CREATION 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseRecordReader.java
>  8e1e0ac 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseScanBatchCreator.java
>  157d84a 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseScanSpec.java
>  PRE-CREATION 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSchemaFactory.java
>  991685c 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseStoragePlugin.java
>  a82c6c3 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseStoragePluginConfig.java
>  a5dfc35 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSubScan.java
>  81a8af5 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseUtils.java
>  PRE-CREATION 
>   
> contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HTableReadEntry.java
>  e18b28d 
>   
> contrib/storage-hbase/src/test/java/org/apache/drill/hbase/HBaseRecordReaderTest.java
>  8a476c3 
>   
> contrib/storage-hbase/src/test/java/org/apache/drill/hbase/HBaseTestsSuite.java
>  df6a98e 
>   
> contrib/storage-hbase/src/test/java/org/apache/drill/hbase/TestHBaseFilterPushDown.java
>  PRE-CREATION 
>   
> contrib/storage-hbase/src/test/java/org/apache/drill/hbase/TestTableGenerator.java
>  2207f1d 
>   
> contrib/storage-hbase/src/test/resources/hbase/hbase_scan_screen_physical.json
>  ae42d6b 
>   
> contrib/storage-hbase/src/test/resources/hbase/hbase_scan_screen_physical_column_select.json
>  7940c65 
>   
> contrib/storage-hbase/src/test/resources/hbase/hbase_scan_screen_physical_family_select.json
>  2dcc81c 
>   contrib/storage-hbase/src/test/resources/storage-plugins.json PRE-CREATION 
>   distribution/src/resources/storage-plugins.json 6f2c015 
> 
> Diff: https://reviews.apache.org/r/20806/diff/
> 
> 
> Testing
> -------
> 
> Added a new test case TestHBaseFilterPushDown which is currently disabled 
> since the Zookeeper port used by MiniHBase cluster is random and there was no 
> clean way to pass this to the HBase storage plugin from SQL.
> 
> To test it, start a local HBase cluster (./bin/start-hbase.sh) and un-comment 
> the Junit's @Ignore annotation.
> 
> 
> Thanks,
> 
> Aditya Kishore
> 
>

Reply via email to