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



trunk/metastore/if/hive_metastore.thrift
<https://reviews.apache.org/r/910/#comment2014>

    Using the form hive_filter_field_params__<parameter key> seems a little 
odd. Can't think of an easy way to handle this case though, so it should 
probably be okay.



trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
<https://reviews.apache.org/r/910/#comment2003>

    I don't think it's possible to create 2 tables with the same name. In which 
case, there shouldn't be a need for this check.



trunk/metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java
<https://reviews.apache.org/r/910/#comment2005>

    We should catch the case where the keyName is invalid


- Paul


On 2011-06-20 21:04:45, Sohan Jain wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/910/
> -----------------------------------------------------------
> 
> (Updated 2011-06-20 21:04:45)
> 
> 
> Review request for hive and Paul Yang.
> 
> 
> Summary
> -------
> 
> Create a function listTableNamesByFilter that returns a list of names for 
> tables in a database that match a certain filter. The syntax of the filter is 
> similar to the one created by HIVE-1609. You can filter the table list based 
> on owner, last access time, or table parameter key/values. The filtering 
> takes place at the JDO level for efficiency/speed.  To create a new kind of 
> table filter, add a constant to thrift.if and a branch in the if statement in 
> generateJDOFilterOverTables() in ExpressionTree.
> 
> Example filter statements include: 
> //translation: owner.matches(".*test.*") and lastAccessTime == 0
> filter = Constants.HIVE_FILTER_FIELD_OWNER + 
>     " like \".*test.*\" and " + 
>     Constants.HIVE_FILTER_FIELD_LAST_ACCESS + " = 0";
> 
> //translation: owner = "test_user" and (parameters.get("retention") == "30" 
> || parameters.get("retention") == 90)
> filter = Constants.HIVE_FILTER_FIELD_OWNER + 
>     " = \"test_user\" and (" + 
>     Constants.HIVE_FILTER_FIELD_PARAMS + "retention = \"30\" or " + 
>     Constants.HIVE_FILTER_FIELD_PARAMS + "retention = \"90\")"
> 
> The filter can currently parse string or integer values, where values 
> interpreted as strings must be in quotes.  See the comments in 
> IMetaStoreClient for more usage details/restrictions.
> 
> 
> This addresses bug HIVE-2226.
>     https://issues.apache.org/jira/browse/HIVE-2226
> 
> 
> Diffs
> -----
> 
>   trunk/metastore/if/hive_metastore.thrift 1136751 
>   
> trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
> 1136751 
>   
> trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
>  1136751 
>   
> trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
>  1136751 
>   trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 
> 1136751 
>   trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java 
> 1136751 
>   
> trunk/metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java
>  1136751 
>   trunk/metastore/src/java/org/apache/hadoop/hive/metastore/parser/Filter.g 
> 1136751 
>   
> trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
>  1136751 
> 
> Diff: https://reviews.apache.org/r/910/diff
> 
> 
> Testing
> -------
> 
> Added test cases to TestHiveMetaStore
> 
> 
> Thanks,
> 
> Sohan
> 
>

Reply via email to