[ 
https://issues.apache.org/jira/browse/HIVE-2226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050821#comment-13050821
 ] 

jirapos...@reviews.apache.org commented on HIVE-2226:
-----------------------------------------------------


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



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

    Can we rename this to TableQueryFilterType so that it's clear that it's 
only used for tables?



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

    Where is this used?



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

    Hive doesn't really use the retention field. Can you remove operations on 
this field from the rest of the diff?



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

    The interface is a little odd because we have to use names like 'owner' or 
'retention' in addition to specifying the QueryFilterType. Maybe we should make 
the field that the QueryFilterType references be called 'field', so you'd have 
a filter like 'field = ".*test_user.*"' (for owner) or 'field > 90' (for 
retention)



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

    Style issue, { should be on same line as if



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

    JDO-174 looks like it was fixed a while back - is this still an issue? bq.  
and < may be useful operators for the the parameters field. (e.g. if retention 
were stored there instead of the member field)


- Paul


On 2011-06-16 03:13:24, Sohan Jain wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/910/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-06-16 03:13:24)
bq.  
bq.  
bq.  Review request for hive and Paul Yang.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  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, retention, or table parameter key/values. The filtering takes place at 
the JDO level for efficiency/speed.  Added a QueryFilterType enum to easily add 
new filters and separate logic for filtering.  
bq.  
bq.  Example filter statements include: 
bq.  filterType = QueryFilterType.OWNER; filter = "owner like ".*test_user.*"
bq.  filterType = QueryFilterType.RETENTION; filter = "retention < 90 and 
retention > 30"
bq.  filterType = QueryFilterType.PARAMS; filter = "numPartitions = \"2\" and  
retention_days = \"30\""
bq.  
bq.  The filter can currently parse string or integer values, where values 
interpreted as strings must be in quotes.
bq.  
bq.  
bq.  This addresses bug HIVE-2226.
bq.      https://issues.apache.org/jira/browse/HIVE-2226
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/metastore/if/hive_metastore.thrift 1135227 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
1135227 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
 1135227 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java 
1135227 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 
1135227 
bq.    trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java 
1135227 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/parser/ExpressionTree.java
 1135227 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/parser/Filter.g 
1135227 
bq.    
trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
 1135227 
bq.  
bq.  Diff: https://reviews.apache.org/r/910/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Added test cases to TestHiveMetaStore
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Sohan
bq.  
bq.



> Add API to retrieve table names by an arbitrary filter, e.g., by owner, 
> retention, parameters, etc.
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2226
>                 URL: https://issues.apache.org/jira/browse/HIVE-2226
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sohan Jain
>            Assignee: Sohan Jain
>         Attachments: HIVE-2226.1.patch
>
>
> Create a function called get_table_names_by_filter that returns a list of 
> table names in a database that match a certain filter.  The filter should 
> operate similar to the one HIVE-1609.  Initially, you should be able to prune 
> the table list based on owner, retention, or table parameter key/values.  The 
> filtering should take place at the JDO level for efficiency/speed.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to