Re: Review Request: HIVE-1636: Implement "SHOW TABLES {FROM | IN} db_name"

2011-01-19 Thread Jonathan Natkins

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

(Updated 2011-01-19 21:06:38.069779)


Review request for hive.


Changes
---

Adding some tests to show_tables.q and database.q


Summary
---

Review request for HIVE-1636.  This implements the syntax "SHOW TABLES [{FROM | 
IN} db_name] [table_pattern]".


This addresses bug HIVE-1636.
https://issues.apache.org/jira/browse/HIVE-1636


Diffs (updated)
-

  ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 32c6e72 
  ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java df7e0f9 
  ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 128f3a6 
  ql/src/java/org/apache/hadoop/hive/ql/plan/ShowTablesDesc.java ec9e933 
  ql/src/test/queries/clientpositive/database.q 2b6c911 
  ql/src/test/queries/clientpositive/show_tables.q 1fa78bf 
  ql/src/test/results/clientpositive/database.q.out a74f9ea 
  ql/src/test/results/clientpositive/show_tables.q.out 0bbd81b 

Diff: https://reviews.apache.org/r/323/diff


Testing
---


Thanks,

Jonathan



Re: Review Request: HIVE-1636: Implement "SHOW TABLES {FROM | IN} db_name"

2011-01-20 Thread Carl Steinbach

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



ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java


nitpicking: I think a switch statement would be more appropriate here.



ql/src/test/queries/clientpositive/show_tables.q


Please add some statements that test quoting of reserved keywords, e.g:

CREATE DATABASE `database`;
SHOW TABLES IN `database`;




ql/src/test/queries/clientpositive/show_tables.q


Hive tries to mimic the syntax of MySQL as closely as possible.

In MySQL the grammar for the SHOW TABLES command is:

SHOW [FULL] TABLES [{FROM | IN} db_name]
[LIKE 'pattern' | WHERE expr]

Please modify the grammar so that Hive also requires a 'LIKE' keyword 
before a pattern.

Ref: http://dev.mysql.com/doc/refman/5.0/en/show-tables.html




ql/src/test/queries/clientpositive/show_tables.q


Showing the tables in a nonexistent database should result in database does 
not exist error, and this query should be moved to a clientnegative query file.




ql/src/test/queries/clientpositive/show_tables.q


This cleanup is unnecessary. QTestUtils.clearTestSideEffects() does it for 
you. It gets called from TestCliDriver and TestNegativeCliDriver so everything 
should be OK.


- Carl


On 2011-01-19 21:06:38, Jonathan Natkins wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/323/
> ---
> 
> (Updated 2011-01-19 21:06:38)
> 
> 
> Review request for hive.
> 
> 
> Summary
> ---
> 
> Review request for HIVE-1636.  This implements the syntax "SHOW TABLES [{FROM 
> | IN} db_name] [table_pattern]".
> 
> 
> This addresses bug HIVE-1636.
> https://issues.apache.org/jira/browse/HIVE-1636
> 
> 
> Diffs
> -
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 32c6e72 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 
> df7e0f9 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 128f3a6 
>   ql/src/java/org/apache/hadoop/hive/ql/plan/ShowTablesDesc.java ec9e933 
>   ql/src/test/queries/clientpositive/database.q 2b6c911 
>   ql/src/test/queries/clientpositive/show_tables.q 1fa78bf 
>   ql/src/test/results/clientpositive/database.q.out a74f9ea 
>   ql/src/test/results/clientpositive/show_tables.q.out 0bbd81b 
> 
> Diff: https://reviews.apache.org/r/323/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Jonathan
> 
>



Re: Review Request: HIVE-1636: Implement "SHOW TABLES {FROM | IN} db_name"

2011-01-25 Thread Jonathan Natkins

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

(Updated 2011-01-25 00:05:03.532883)


Review request for hive.


Summary
---

Review request for HIVE-1636.  This implements the syntax "SHOW TABLES [{FROM | 
IN} db_name] [table_pattern]".


This addresses bug HIVE-1636.
https://issues.apache.org/jira/browse/HIVE-1636


Diffs (updated)
-

  ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 32c6e72 
  ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java df7e0f9 
  ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 128f3a6 
  ql/src/java/org/apache/hadoop/hive/ql/plan/ShowTablesDesc.java ec9e933 
  ql/src/test/queries/clientnegative/show_tables_bad1.q PRE-CREATION 
  ql/src/test/queries/clientnegative/show_tables_bad2.q PRE-CREATION 
  ql/src/test/queries/clientnegative/show_tables_bad_db1.q PRE-CREATION 
  ql/src/test/queries/clientnegative/show_tables_bad_db2.q PRE-CREATION 
  ql/src/test/queries/clientpositive/database.q 2b6c911 
  ql/src/test/queries/clientpositive/show_tables.q 1fa78bf 
  ql/src/test/results/clientnegative/show_tables_bad1.q.out PRE-CREATION 
  ql/src/test/results/clientnegative/show_tables_bad2.q.out PRE-CREATION 
  ql/src/test/results/clientnegative/show_tables_bad_db1.q.out PRE-CREATION 
  ql/src/test/results/clientnegative/show_tables_bad_db2.q.out PRE-CREATION 
  ql/src/test/results/clientpositive/database.q.out a74f9ea 
  ql/src/test/results/clientpositive/show_tables.q.out 0bbd81b 

Diff: https://reviews.apache.org/r/323/diff


Testing
---


Thanks,

Jonathan