[jira] [Updated] (HIVE-2826) ALTER VIEW ADD (IF NOT EXISTS) PARTITION syntax is bad.

2012-04-10 Thread Adam Kramer (Updated) (JIRA)

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

Adam Kramer updated HIVE-2826:
--

Description: 
The syntax, ALTER TABLE x ADD IF NOT EXISTS PARTITION, puts the "IF NOT EXISTS" 
before the subject of the statement. Not only is this weird grammar, but it is 
also inconsistent with other uses of "IF NOT EXISTS", for example, "CREATE 
TABLE IF NOT EXISTS" and "DROP TABLE IF EXISTS".

It would be a minor improvement to align the syntaxes.


  was:
Support for ALTER TABLE x ADD IF NOT EXISTS PARTITION was added in HIVE-1106. 
The same semantics should be supported for ALTER VIEW.

WAS:
When trying to add a partition, if the partition already exists, we shouldn't 
necessarily cause the job to fail...just like we have CREATE TABLE IF NOT 
EXISTS and DROP TABLE IF EXISTS, we should have ALTER TABLE foo ADD PARTITION 
IF NOT EXISTS (ds=whatever).

Ditto for ALTER VIEW.

Summary: ALTER VIEW ADD (IF NOT EXISTS) PARTITION syntax is bad.  (was: 
ALTER VIEW ADD PARTITION needs IF NOT EXISTS.)

> ALTER VIEW ADD (IF NOT EXISTS) PARTITION syntax is bad.
> ---
>
> Key: HIVE-2826
> URL: https://issues.apache.org/jira/browse/HIVE-2826
> Project: Hive
>  Issue Type: Improvement
>Reporter: Adam Kramer
>
> The syntax, ALTER TABLE x ADD IF NOT EXISTS PARTITION, puts the "IF NOT 
> EXISTS" before the subject of the statement. Not only is this weird grammar, 
> but it is also inconsistent with other uses of "IF NOT EXISTS", for example, 
> "CREATE TABLE IF NOT EXISTS" and "DROP TABLE IF EXISTS".
> It would be a minor improvement to align the syntaxes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (HIVE-2826) ALTER VIEW ADD (IF NOT EXISTS) PARTITION syntax is bad.

2012-04-10 Thread Adam Kramer (Updated) (JIRA)

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

Adam Kramer updated HIVE-2826:
--

Priority: Minor  (was: Major)

> ALTER VIEW ADD (IF NOT EXISTS) PARTITION syntax is bad.
> ---
>
> Key: HIVE-2826
> URL: https://issues.apache.org/jira/browse/HIVE-2826
> Project: Hive
>  Issue Type: Improvement
>Reporter: Adam Kramer
>Priority: Minor
>
> The syntax, ALTER TABLE x ADD IF NOT EXISTS PARTITION, puts the "IF NOT 
> EXISTS" before the subject of the statement. Not only is this weird grammar, 
> but it is also inconsistent with other uses of "IF NOT EXISTS", for example, 
> "CREATE TABLE IF NOT EXISTS" and "DROP TABLE IF EXISTS".
> It would be a minor improvement to align the syntaxes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (HIVE-835) Deprecate, remove, or fix MAP and REDUCE syntax.

2011-11-25 Thread Adam Kramer (Updated) (JIRA)

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

Adam Kramer updated HIVE-835:
-

  Priority: Minor  (was: Major)
Issue Type: Bug  (was: Improvement)

> Deprecate, remove, or fix MAP and REDUCE syntax.
> 
>
> Key: HIVE-835
> URL: https://issues.apache.org/jira/browse/HIVE-835
> Project: Hive
>  Issue Type: Bug
>  Components: SQL
>Reporter: Adam Kramer
>Priority: Minor
>
> There are syntactic elements MAP and REDUCE which function as syntactic sugar 
> for SELECT TRANSFORM. This behavior is not at all intuitive, because no 
> checking or verification is done to ensure that the user's intention is met.
> Specifically, Hive may see a MAP query and simply tack the transform script 
> on to the end of a reduce job (so, the user says MAP but hive does a REDUCE), 
> or (more dangerously) vice-versa. Given that Hive's whole point is to sit on 
> top of a mapreduce framework and allow transformations in the mapper or 
> reducer, it seems very inappropriate for Hive to ignore a clear command from 
> the user to MAP or to REDUCE the data using a script, and then simply ignore 
> it.
> Better behavior would be for hive to see a MAP command and to start a new 
> mapreduce step and run the command in the mapper (even if it otherwise would 
> be run in the reducer), and for REDUCE to begin a reduce step if necessary 
> (so, tack the REDUCE script on to the end of a REDUCE job if the current 
> system would do so, or if not, treat the 0th column as the reduce key, throw 
> a warning saying this has been done, and force a reduce job).
> Acceptable behavior would be to throw an error or warning when the user's 
> clearly-stated desire is going to be ignored. "Warning: User used MAP 
> keyword, but transformation will occur in the reduce phase" / "Warning: User 
> used REDUCE keyword, but did not specify DISTRIBUTE BY / CLUSTER BY column. 
> Transformation will occur in the map phase."

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira