Re: Review Request 66349: HIVE-19059 Support DEFAULT keyword with INSERT and UPDATE

2018-03-29 Thread Vineet Garg


> On March 29, 2018, 6:12 p.m., Jesús Camacho Rodríguez wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
> > Lines 779 (patched)
> > 
> >
> > Can we refactor this so we call _isValueClause_ and _updating_ 
> > functions only once (trying to avoid some overhead)?
> 
> Vineet Garg wrote:
> I am not sure if I understand your comment. It'll be called only once 
> when doPhase1GetColumnAliasesFromSelect is called.
> 
> Jesús Camacho Rodríguez wrote:
> I meant below: these functions are called in L784 and L788 again, no need 
> to traverse AST multiple times.

Ah got it. I'll fix this


- Vineet


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


On March 30, 2018, 4:43 a.m., Vineet Garg wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66349/
> ---
> 
> (Updated March 30, 2018, 4:43 a.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan and Jesús Camacho Rodríguez.
> 
> 
> Bugs: HIVE-19059
> https://issues.apache.org/jira/browse/HIVE-19059
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> This patch adds support for specifying DEFAULT keyword with INSERT and UPDATE 
> e.g.
> INSERT INTO T1 values(DEFAULT, DEFAULT..)
> 
> 
> Diffs
> -
> 
>   itests/src/test/resources/testconfiguration.properties e188619a6d 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
> 26f20f2e05 
>   ql/src/test/queries/clientpositive/insert_into_default_keyword.q 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/llap/insert_into_default_keyword.q.out 
> PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/66349/diff/3/
> 
> 
> Testing
> ---
> 
> Added more tests
> Existing pcommit tests
> 
> 
> Thanks,
> 
> Vineet Garg
> 
>



Re: Review Request 66349: HIVE-19059 Support DEFAULT keyword with INSERT and UPDATE

2018-03-29 Thread Jesús Camacho Rodríguez


> On March 29, 2018, 6:12 p.m., Jesús Camacho Rodríguez wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
> > Lines 779 (patched)
> > 
> >
> > Can we refactor this so we call _isValueClause_ and _updating_ 
> > functions only once (trying to avoid some overhead)?
> 
> Vineet Garg wrote:
> I am not sure if I understand your comment. It'll be called only once 
> when doPhase1GetColumnAliasesFromSelect is called.

I meant below: these functions are called in L784 and L788 again, no need to 
traverse AST multiple times.


- Jesús


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


On March 30, 2018, 4:43 a.m., Vineet Garg wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66349/
> ---
> 
> (Updated March 30, 2018, 4:43 a.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan and Jesús Camacho Rodríguez.
> 
> 
> Bugs: HIVE-19059
> https://issues.apache.org/jira/browse/HIVE-19059
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> This patch adds support for specifying DEFAULT keyword with INSERT and UPDATE 
> e.g.
> INSERT INTO T1 values(DEFAULT, DEFAULT..)
> 
> 
> Diffs
> -
> 
>   itests/src/test/resources/testconfiguration.properties e188619a6d 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
> 26f20f2e05 
>   ql/src/test/queries/clientpositive/insert_into_default_keyword.q 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/llap/insert_into_default_keyword.q.out 
> PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/66349/diff/3/
> 
> 
> Testing
> ---
> 
> Added more tests
> Existing pcommit tests
> 
> 
> Thanks,
> 
> Vineet Garg
> 
>



Re: Review Request 66349: HIVE-19059 Support DEFAULT keyword with INSERT and UPDATE

2018-03-29 Thread Vineet Garg


> On March 29, 2018, 6:12 p.m., Jesús Camacho Rodríguez wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
> > Lines 763 (patched)
> > 
> >
> > We can be aggressive here too.

Before calling this method we have already made sure that this is struct so I 
don't think the check is necessary here.


> On March 29, 2018, 6:12 p.m., Jesús Camacho Rodríguez wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
> > Lines 779 (patched)
> > 
> >
> > Can we refactor this so we call _isValueClause_ and _updating_ 
> > functions only once (trying to avoid some overhead)?

I am not sure if I understand your comment. It'll be called only once when 
doPhase1GetColumnAliasesFromSelect is called.


- Vineet


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


On March 30, 2018, 4:43 a.m., Vineet Garg wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66349/
> ---
> 
> (Updated March 30, 2018, 4:43 a.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan and Jesús Camacho Rodríguez.
> 
> 
> Bugs: HIVE-19059
> https://issues.apache.org/jira/browse/HIVE-19059
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> This patch adds support for specifying DEFAULT keyword with INSERT and UPDATE 
> e.g.
> INSERT INTO T1 values(DEFAULT, DEFAULT..)
> 
> 
> Diffs
> -
> 
>   itests/src/test/resources/testconfiguration.properties e188619a6d 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
> 26f20f2e05 
>   ql/src/test/queries/clientpositive/insert_into_default_keyword.q 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/llap/insert_into_default_keyword.q.out 
> PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/66349/diff/3/
> 
> 
> Testing
> ---
> 
> Added more tests
> Existing pcommit tests
> 
> 
> Thanks,
> 
> Vineet Garg
> 
>



Re: Review Request 66349: HIVE-19059 Support DEFAULT keyword with INSERT and UPDATE

2018-03-29 Thread Vineet Garg

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

(Updated March 30, 2018, 4:43 a.m.)


Review request for hive, Ashutosh Chauhan and Jesús Camacho Rodríguez.


Bugs: HIVE-19059
https://issues.apache.org/jira/browse/HIVE-19059


Repository: hive-git


Description
---

This patch adds support for specifying DEFAULT keyword with INSERT and UPDATE 
e.g.
INSERT INTO T1 values(DEFAULT, DEFAULT..)


Diffs (updated)
-

  itests/src/test/resources/testconfiguration.properties e188619a6d 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 26f20f2e05 
  ql/src/test/queries/clientpositive/insert_into_default_keyword.q PRE-CREATION 
  ql/src/test/results/clientpositive/llap/insert_into_default_keyword.q.out 
PRE-CREATION 


Diff: https://reviews.apache.org/r/66349/diff/3/

Changes: https://reviews.apache.org/r/66349/diff/2-3/


Testing
---

Added more tests
Existing pcommit tests


Thanks,

Vineet Garg



[jira] [Created] (HIVE-19083) Make partition clause optional for INSERT

2018-03-29 Thread Vineet Garg (JIRA)
Vineet Garg created HIVE-19083:
--

 Summary: Make partition clause optional for INSERT
 Key: HIVE-19083
 URL: https://issues.apache.org/jira/browse/HIVE-19083
 Project: Hive
  Issue Type: Sub-task
  Components: SQL
Reporter: Vineet Garg
Assignee: Vineet Garg
 Fix For: 3.0.0






--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: Review Request 66185: JDBC: Provide an option to simplify beeline usage by supporting default and named URL for beeline

2018-03-29 Thread Thejas Nair


> On March 29, 2018, 11:32 p.m., Vihang Karajgaonkar wrote:
> > beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParser.java
> > Lines 79 (patched)
> > 
> >
> > Most of the code in this file is duplicated from 
> > UserHS2ConnectionFileParser. This logic would work for what you are trying 
> > to achieve but I think we are doing this in much more complex way than 
> > necessary. Here is my suggestion:
> > 
> > Based on my understanding you have following requirements:
> > 1. User will provide a named url like eg blue using beeline -c blue
> > 2. If the user doesn't provide a named url a default url is used.
> > 
> > You can do this with a small change in the existing code and without 
> > the need to merge the two connection files. In the example above, if the 
> > user doesn't specify -c option above but the beeline-hs2-connection.xml 
> > exists the code is same as what we have currently. (We can obviously 
> > support beeline-site.xml name as well with a trivial change)
> > 
> > if the user specifies beeline -c blue instead, in 
> > UserHS2ConnectionFileParser.getConnectionProperties() instead of looking 
> > for keys starting for beeline.hs2.connection. you can modify the code to 
> > look for keys starting from beeline.hs2.connection.blue. In that case you 
> > reuse most of the existing code and don't need the additional merging 
> > logic. The result is you have only one user connection file and one 
> > hive-site.xml which can be overriden by user connection file.
> > 
> > The only compromise in the above design is that you cannot provide one 
> > long url string like you want to do in beeline-site.xml. If this is not a 
> > hard requirement, I think we will have a much cleaner implementation with 
> > less confusion between having two connection xml files which behave almost 
> > the same way. If its a hard requirement, I guess you can still do by 
> > defining a new key like you are doing currently for beeline-site.xml
> > 
> > Is there a use-case which will not work in my suggestion above? May be 
> > I am missing something very obvious. Would appreciate if you could help me 
> > undestand. Thanks!

Vihang, here are the requirements -

* Beeline can be used in hosts that are not part of the hadoop cluster. 
hive-site.xml might not be available there. Also, editing the large 
hive-site.xml (if user is not in the cluster) is going to be complicated for 
users. So we don't want to rely on hive-site.xml.
* Having the complete url as a config param in beeline-site.xml makes easy to 
manage. You don't have to edit multiple parameters to add a new named URL to 
it. Ambari provides full HS2 jdbc URL that is easy to copy and then add to this 
file (when not managed by Ambari).
* If the host is part of a hadoop cluster, then beeline-site.xml can be added 
by Ambari (or equivalent). However, there are client environment related 
parameters that user might want to set in addition to that (SSL truststore for 
example). In that case you don't want the user to modify beeline-site.xml 
directly as it would get overwritten. So having a second user override .xml 
file helps users to manage those settings seperately.


- Thejas


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


On March 28, 2018, 8:27 p.m., Vaibhav Gumashta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66185/
> ---
> 
> (Updated March 28, 2018, 8:27 p.m.)
> 
> 
> Review request for hive, Thejas Nair and Vihang Karajgaonkar.
> 
> 
> Bugs: HIVE-18963
> https://issues.apache.org/jira/browse/HIVE-18963
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> https://issues.apache.org/jira/browse/HIVE-18963
> 
> 
> Diffs
> -
> 
>   beeline/src/java/org/apache/hive/beeline/BeeLine.java 402fae 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineConfFileParseException.java
>  PRE-CREATION 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineHS2ConnectionFileParseException.java
>  acddf82a67 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParseException.java
>  PRE-CREATION 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParser.java 
> PRE-CREATION 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileParser.java
>  b769e8581f 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileUtils.java
>  f635b40633 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/UserHS2ConnectionFileParser.java
>  

[jira] [Created] (HIVE-19082) HiveLexer.allowQuotedId defaults incorrectly in the absence of hiveConf

2018-03-29 Thread Adam Kennedy (JIRA)
Adam Kennedy created HIVE-19082:
---

 Summary: HiveLexer.allowQuotedId defaults incorrectly in the 
absence of hiveConf
 Key: HIVE-19082
 URL: https://issues.apache.org/jira/browse/HIVE-19082
 Project: Hive
  Issue Type: Improvement
  Components: Parser
Affects Versions: 2.3.2, 2.3.1, 2.3.0, 2.2.0, 2.1.1, 2.1.0
Reporter: Adam Kennedy


In HIVE-13101 a default was applied to prevent a null pointer exception when 
hiveConf is null due to ParseDriver.parse(command) being called without a 
Context parameter for a SQL command containing quoted identifiers. For 
example...

CREATE TABLE `foo` (`bar` STRING)

Unfortunately, this false default is the opposite behavior of what occurs when 
a Configuration is provided that does not contain an explicit value for the 
setting.

The default for HiveConf.ConfVars.HIVE_QUOTEDID_SUPPORT is "column", which then 
returns true.

Instead of shortcutting explicitly to false, the method should take the value 
from...

HiveConf.ConfVars.HIVE_QUOTEDID_SUPPORT.getDefaultValue()

...and then apply the !"none".equals(...) check as normal.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: [VOTE] Apache Hive 2.3.3 Release Candidate 0

2018-03-29 Thread Alan Gates
+1.  Did a build in an empty repo, ran rat, checked the key signature and
sha256, checked for any binary objects in the output.

Alan.

On Thu, Mar 29, 2018 at 12:26 AM, Daniel Dai  wrote:

> Apache Hive 2.3.3 Release Candidate 0 is available here:
>
> http://people.apache.org/~daijy/apache-hive-2.3.3-rc-0/
>
> Maven artifacts are available here:
>
> https://repository.apache.org/content/repositories/orgapachehive-1084/
>
> Source tag for RCN is at:
> https://github.com/apache/hive/tree/release-2.3.3-rc0
>
> Voting will conclude in 72 hours.
>
> Hive PMC Members: Please test and vote.
>
> Thanks.
>


Re: Review Request 66185: JDBC: Provide an option to simplify beeline usage by supporting default and named URL for beeline

2018-03-29 Thread Vihang Karajgaonkar via Review Board

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




beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParser.java
Lines 34-37 (patched)


Can you update the this javadoc?



beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParser.java
Lines 79 (patched)


Most of the code in this file is duplicated from 
UserHS2ConnectionFileParser. This logic would work for what you are trying to 
achieve but I think we are doing this in much more complex way than necessary. 
Here is my suggestion:

Based on my understanding you have following requirements:
1. User will provide a named url like eg blue using beeline -c blue
2. If the user doesn't provide a named url a default url is used.

You can do this with a small change in the existing code and without the 
need to merge the two connection files. In the example above, if the user 
doesn't specify -c option above but the beeline-hs2-connection.xml exists the 
code is same as what we have currently. (We can obviously support 
beeline-site.xml name as well with a trivial change)

if the user specifies beeline -c blue instead, in 
UserHS2ConnectionFileParser.getConnectionProperties() instead of looking for 
keys starting for beeline.hs2.connection. you can modify the code to look for 
keys starting from beeline.hs2.connection.blue. In that case you reuse most of 
the existing code and don't need the additional merging logic. The result is 
you have only one user connection file and one hive-site.xml which can be 
overriden by user connection file.

The only compromise in the above design is that you cannot provide one long 
url string like you want to do in beeline-site.xml. If this is not a hard 
requirement, I think we will have a much cleaner implementation with less 
confusion between having two connection xml files which behave almost the same 
way. If its a hard requirement, I guess you can still do by defining a new key 
like you are doing currently for beeline-site.xml

Is there a use-case which will not work in my suggestion above? May be I am 
missing something very obvious. Would appreciate if you could help me 
undestand. Thanks!


- Vihang Karajgaonkar


On March 28, 2018, 8:27 p.m., Vaibhav Gumashta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66185/
> ---
> 
> (Updated March 28, 2018, 8:27 p.m.)
> 
> 
> Review request for hive, Thejas Nair and Vihang Karajgaonkar.
> 
> 
> Bugs: HIVE-18963
> https://issues.apache.org/jira/browse/HIVE-18963
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> https://issues.apache.org/jira/browse/HIVE-18963
> 
> 
> Diffs
> -
> 
>   beeline/src/java/org/apache/hive/beeline/BeeLine.java 402fae 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineConfFileParseException.java
>  PRE-CREATION 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineHS2ConnectionFileParseException.java
>  acddf82a67 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParseException.java
>  PRE-CREATION 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParser.java 
> PRE-CREATION 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileParser.java
>  b769e8581f 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileUtils.java
>  f635b40633 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/UserHS2ConnectionFileParser.java
>  2801ebee09 
>   beeline/src/main/resources/BeeLine.properties 6fca953836 
>   
> beeline/src/test/org/apache/hive/beeline/hs2connection/TestUserHS2ConnectionFileParser.java
>  1d17887417 
>   beeline/src/test/resources/test-hs2-named-connection-config.xml 
> PRE-CREATION 
>   
> itests/hive-unit/src/test/java/org/apache/hive/beeline/hs2connection/BeelineWithHS2ConnectionFileTestBase.java
>  3da31ad8a9 
>   jdbc/src/java/org/apache/hive/jdbc/Utils.java 6d7787da7d 
> 
> 
> Diff: https://reviews.apache.org/r/66185/diff/2/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Vaibhav Gumashta
> 
>



Re: Review Request 66185: JDBC: Provide an option to simplify beeline usage by supporting default and named URL for beeline

2018-03-29 Thread Thejas Nair

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




beeline/src/java/org/apache/hive/beeline/BeeLine.java
Lines 1110 (patched)


it would be useful to print the URL as part of this error message.



beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineConfFileParseException.java
Lines 21 (patched)


why is this needed ? This is not marked as serializable.



beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParseException.java
Lines 21 (patched)


looks unnecessary



beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileUtils.java
Lines 148 (patched)


javadoc describing what this is supposed to do would be useful



beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileUtils.java
Lines 156-157 (patched)


String host = getMergedProperty(userConnectionProperties, 
jdbcConnectionParams, HS2ConnectionFileParser.HOST_PROPERTY_KEY, null /*default 
value*/);

would be enable code re-use between this and defaultDb value extraction.


- Thejas Nair


On March 28, 2018, 8:27 p.m., Vaibhav Gumashta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66185/
> ---
> 
> (Updated March 28, 2018, 8:27 p.m.)
> 
> 
> Review request for hive, Thejas Nair and Vihang Karajgaonkar.
> 
> 
> Bugs: HIVE-18963
> https://issues.apache.org/jira/browse/HIVE-18963
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> https://issues.apache.org/jira/browse/HIVE-18963
> 
> 
> Diffs
> -
> 
>   beeline/src/java/org/apache/hive/beeline/BeeLine.java 402fae 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineConfFileParseException.java
>  PRE-CREATION 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineHS2ConnectionFileParseException.java
>  acddf82a67 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParseException.java
>  PRE-CREATION 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParser.java 
> PRE-CREATION 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileParser.java
>  b769e8581f 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileUtils.java
>  f635b40633 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/UserHS2ConnectionFileParser.java
>  2801ebee09 
>   beeline/src/main/resources/BeeLine.properties 6fca953836 
>   
> beeline/src/test/org/apache/hive/beeline/hs2connection/TestUserHS2ConnectionFileParser.java
>  1d17887417 
>   beeline/src/test/resources/test-hs2-named-connection-config.xml 
> PRE-CREATION 
>   
> itests/hive-unit/src/test/java/org/apache/hive/beeline/hs2connection/BeelineWithHS2ConnectionFileTestBase.java
>  3da31ad8a9 
>   jdbc/src/java/org/apache/hive/jdbc/Utils.java 6d7787da7d 
> 
> 
> Diff: https://reviews.apache.org/r/66185/diff/2/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Vaibhav Gumashta
> 
>



Re: Review Request 66185: JDBC: Provide an option to simplify beeline usage by supporting default and named URL for beeline

2018-03-29 Thread Thejas Nair

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




beeline/src/java/org/apache/hive/beeline/BeeLine.java
Lines 1110 (patched)


it would be useful to print the URL as part of this error message.



beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineConfFileParseException.java
Lines 21 (patched)


why is this needed ? This is not marked as serializable.



beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParseException.java
Lines 21 (patched)


looks unnecessary



beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileUtils.java
Lines 148 (patched)


javadoc describing what this is supposed to do would be useful



beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileUtils.java
Lines 156-157 (patched)


String host = getMergedProperty(userConnectionProperties, 
jdbcConnectionParams, HS2ConnectionFileParser.HOST_PROPERTY_KEY, null /*default 
value*/);

would be enable code re-use between this and defaultDb value extraction.


- Thejas Nair


On March 28, 2018, 8:27 p.m., Vaibhav Gumashta wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66185/
> ---
> 
> (Updated March 28, 2018, 8:27 p.m.)
> 
> 
> Review request for hive, Thejas Nair and Vihang Karajgaonkar.
> 
> 
> Bugs: HIVE-18963
> https://issues.apache.org/jira/browse/HIVE-18963
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> https://issues.apache.org/jira/browse/HIVE-18963
> 
> 
> Diffs
> -
> 
>   beeline/src/java/org/apache/hive/beeline/BeeLine.java 402fae 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineConfFileParseException.java
>  PRE-CREATION 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineHS2ConnectionFileParseException.java
>  acddf82a67 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParseException.java
>  PRE-CREATION 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/BeelineSiteParser.java 
> PRE-CREATION 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileParser.java
>  b769e8581f 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/HS2ConnectionFileUtils.java
>  f635b40633 
>   
> beeline/src/java/org/apache/hive/beeline/hs2connection/UserHS2ConnectionFileParser.java
>  2801ebee09 
>   beeline/src/main/resources/BeeLine.properties 6fca953836 
>   
> beeline/src/test/org/apache/hive/beeline/hs2connection/TestUserHS2ConnectionFileParser.java
>  1d17887417 
>   beeline/src/test/resources/test-hs2-named-connection-config.xml 
> PRE-CREATION 
>   
> itests/hive-unit/src/test/java/org/apache/hive/beeline/hs2connection/BeelineWithHS2ConnectionFileTestBase.java
>  3da31ad8a9 
>   jdbc/src/java/org/apache/hive/jdbc/Utils.java 6d7787da7d 
> 
> 
> Diff: https://reviews.apache.org/r/66185/diff/2/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Vaibhav Gumashta
> 
>



[jira] [Created] (HIVE-19081) Add partition should prevent loading acid files

2018-03-29 Thread Eugene Koifman (JIRA)
Eugene Koifman created HIVE-19081:
-

 Summary: Add partition should prevent loading acid files
 Key: HIVE-19081
 URL: https://issues.apache.org/jira/browse/HIVE-19081
 Project: Hive
  Issue Type: Bug
  Components: Transactions
Affects Versions: 3.0.0
Reporter: Eugene Koifman
Assignee: Eugene Koifman


similar to HIVE-19029
{{Alter Table T add Partition ...} T is acid should check to make sure input 
files were not copied from another Acid table, i.e. make sure the files don't 
have Acid metadata columns.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Review Request 66370: HIVE-18725: Improve error handling for subqueries if there is wrong column reference

2018-03-29 Thread Igor Kryvenko

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

Review request for hive, Ashutosh Chauhan and Vineet Garg.


Bugs: HIVE-18725
https://issues.apache.org/jira/browse/HIVE-18725


Repository: hive-git


Description
---

If there is a column reference within subquery which doesn't exist Hive throws 
misleading error message.


Diffs
-

  
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/CalciteSubquerySemanticException.java
 4321a5c7894cec0713ef6e89092ec923f8273b4c 
  
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/CalciteViewSemanticException.java
 c2a4e94a032b46134932d4bec5f70b197788654b 
  ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java 
41de17fd4679009ef6a4fb5a6d976cbc794ce791 


Diff: https://reviews.apache.org/r/66370/diff/1/


Testing
---


Thanks,

Igor Kryvenko



Review Request 66369: HIVE-18839

2018-03-29 Thread Jesús Camacho Rodríguez

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

Review request for hive and Ashutosh Chauhan.


Bugs: HIVE-18839
https://issues.apache.org/jira/browse/HIVE-18839


Repository: hive-git


Description
---

HIVE-18839


Diffs
-

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 
697b1940a928000d23e414025d990ef50d20ea69 
  ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 
01cadeaaab2c8dd97b081d59baa06f450338027f 
  ql/src/java/org/apache/hadoop/hive/ql/exec/MaterializedViewTask.java 
de120afbbcd02dc23dff163c14fd7c8fba25db0c 
  ql/src/java/org/apache/hadoop/hive/ql/lockmgr/DbTxnManager.java 
89ca1ff5cf1135cda85090ad2d03088b51680151 
  ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManager.java 
0db2a2c3ed5fda2352f2f63acbce8c6b4b889b84 
  ql/src/java/org/apache/hadoop/hive/ql/lockmgr/HiveTxnManagerImpl.java 
c8cafa2a68f897b1034e5bf61e872e044e01c22a 
  ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java 
d76c8b6f40e8ab8a62875f6801d40b6c23c0ae85 
  
ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveMaterializedViewsRegistry.java
 53dc8ec1974dfc095bd5c7601c8d486b4712319e 
  
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/views/HiveAggregateIncrementalRewritingRule.java
 PRE-CREATION 
  
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/views/HiveNoAggregateIncrementalRewritingRule.java
 PRE-CREATION 
  
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/views/MaterializedViewRewritingRelVisitor.java
 PRE-CREATION 
  ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java 
41de17fd4679009ef6a4fb5a6d976cbc794ce791 
  
ql/src/java/org/apache/hadoop/hive/ql/parse/MaterializedViewRebuildSemanticAnalyzer.java
 75eb50c5797b312f66e81b5cec23849684e641fc 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
26f20f2e05478fdbd05e494bf1a843567f2dff2c 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTFGetSplits.java 
4c86fb89376041b30bc5c90a4e84f2e685d8ff82 
  ql/src/test/queries/clientpositive/materialized_view_create_rewrite_4.q 
c7f050be8da71f13463c22df2ccdab21c0e40b6a 
  ql/src/test/queries/clientpositive/materialized_view_create_rewrite_5.q 
PRE-CREATION 
  ql/src/test/results/clientpositive/materialized_view_create_rewrite_3.q.out 
65614566c9b738ea0354dc6d206a0ed7e635174e 
  ql/src/test/results/clientpositive/materialized_view_create_rewrite_4.q.out 
48c0ecb23f1657c99ef30ed6963a3af1737f0514 
  ql/src/test/results/clientpositive/materialized_view_create_rewrite_5.q.out 
PRE-CREATION 
  standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h 
e10a655e762eaaa5b0c32b2d1cf43a80a42410bc 
  standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp 
0f49d93277165e572c9b607eeed9ab3a168c1c0b 
  
standalone-metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
 d7319e247524d82603bc27d1bb791cbe1c79d740 
  standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.h 
724f02229b54f0e9a7ec8ab0546a83650860d1f1 
  standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp 
8e357f6422fecfecac5a558c04ec741f06b87a62 
  
standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Materialization.java
 fec35d50b7009439da7f7b40911e4816996fb4fc 
  
standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
 e824f4a145cd049eb712b372dbf7fea3b7c36d42 
  standalone-metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php 
d00d11be3e054b805cb5c09c0222da2aa3a013f7 
  standalone-metastore/src/gen/thrift/gen-php/metastore/Types.php 
32c8cb7bc57eb09a67bb971bcfe49155f6790a78 
  
standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
 1b3ebcf6ef9775785008bd3b549516f8932dd64f 
  
standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
 cf36654b5127a445577197dbf365352081e64e96 
  standalone-metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py 
fd157b2781f0746234ab62548855f14b5fc4ed64 
  standalone-metastore/src/gen/thrift/gen-rb/hive_metastore_types.rb 
aa93158fa621e48552c0d108b68a12d8ed3589e9 
  standalone-metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb 
7a07b73cc709684e8c548ebbbe4882d562f069e5 
  
standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
 8a5de09ccf1ebc21a86f479a65bb6e78defc3c31 
  
standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
 d4bdcf1a79b18e61eb5d427646019a6dbcc9b4c0 
  
standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
 c69192b73195dcfae3f2567d419ef0b0cf913a1e 
  
standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/MaterializationInvalidationInfo.java
 3d774071c2ff00e892540364a7ec63e49b8089df 
  

[jira] [Created] (HIVE-19080) Fix travis build

2018-03-29 Thread Prasanth Jayachandran (JIRA)
Prasanth Jayachandran created HIVE-19080:


 Summary: Fix travis build
 Key: HIVE-19080
 URL: https://issues.apache.org/jira/browse/HIVE-19080
 Project: Hive
  Issue Type: Bug
Affects Versions: 3.0.0
Reporter: Prasanth Jayachandran
Assignee: Prasanth Jayachandran


Travis build has been failing for a while.
Will comment cache directive and retry. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: Review Request 66201: HIVE-19014 utilize YARN-8028 (queue ACL check) in Hive Tez session pool

2018-03-29 Thread Sergey Shelukhin

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

(Updated March 29, 2018, 8:04 p.m.)


Review request for hive and Thejas Nair.


Repository: hive-git


Description
---

see jira


Diffs (updated)
-

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 697b1940a9 
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java ed3984efe8 
  ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java 1de333e985 
  ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPoolManager.java 
a051f90195 
  ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezTask.java a5f4cb7539 
  ql/src/java/org/apache/hadoop/hive/ql/exec/tez/YarnQueueHelper.java 
PRE-CREATION 
  ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java 
74c271d80b 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFLoggedInUser.java 
3ed793ec48 
  service/src/java/org/apache/hive/service/server/HiveServer2.java 6308c5cd4f 


Diff: https://reviews.apache.org/r/66201/diff/5/

Changes: https://reviews.apache.org/r/66201/diff/4-5/


Testing
---


Thanks,

Sergey Shelukhin



[jira] [Created] (HIVE-19079) Add extended query string to Spark job description

2018-03-29 Thread Sahil Takiar (JIRA)
Sahil Takiar created HIVE-19079:
---

 Summary: Add extended query string to Spark job description
 Key: HIVE-19079
 URL: https://issues.apache.org/jira/browse/HIVE-19079
 Project: Hive
  Issue Type: Sub-task
  Components: Spark
Reporter: Sahil Takiar


As of HIVE-16601, we place a shortened very of the query into the Spark job 
description. We should look into adding a longer version of the query. It seems 
that the Spark Web UI has a nice feature where long job descriptions will be 
truncated with a {{...}}, but when you click on the {{...}} it expands to show 
the rest of the string. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Review Request 66368: HIVE-18609: Results cache invalidation based on table updates

2018-03-29 Thread Jason Dere

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

Review request for hive, Gopal V and Jesús Camacho Rodríguez.


Bugs: HIVE-18609
https://issues.apache.org/jira/browse/HIVE-18609


Repository: hive-git


Description
---

- Save ValidTxnWriteIdList when saving query to the results cache.
- Compare the write ID list for each transactional table during results cache 
lookup.
- Add configuration to determine if queries with non-transactional tables 
should be cached.


Diffs
-

  common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 8d9b5a3194 
  itests/src/test/resources/testconfiguration.properties 0d6aaae535 
  ql/src/java/org/apache/hadoop/hive/ql/Driver.java 667f436a89 
  ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java 
4fa1044232 
  ql/src/java/org/apache/hadoop/hive/ql/io/AcidUtils.java 1828f0a531 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 26f20f2e05 
  ql/src/test/queries/clientpositive/results_cache_1.q 4aea60e1e5 
  ql/src/test/queries/clientpositive/results_cache_2.q 96a90925f6 
  ql/src/test/queries/clientpositive/results_cache_capacity.q 9f54577009 
  ql/src/test/queries/clientpositive/results_cache_empty_result.q 621367141e 
  ql/src/test/queries/clientpositive/results_cache_invalidation.q PRE-CREATION 
  ql/src/test/queries/clientpositive/results_cache_lifetime.q 60ffe96a04 
  ql/src/test/queries/clientpositive/results_cache_quoted_identifiers.q 
4802f43ba9 
  ql/src/test/queries/clientpositive/results_cache_temptable.q 9e0de765cb 
  ql/src/test/queries/clientpositive/results_cache_transactional.q PRE-CREATION 
  ql/src/test/queries/clientpositive/results_cache_with_masking.q b4fcdd57eb 
  ql/src/test/results/clientpositive/llap/results_cache_invalidation.q.out 
PRE-CREATION 
  ql/src/test/results/clientpositive/llap/results_cache_transactional.q.out 
PRE-CREATION 
  ql/src/test/results/clientpositive/results_cache_invalidation.q.out 
PRE-CREATION 
  ql/src/test/results/clientpositive/results_cache_transactional.q.out 
PRE-CREATION 


Diff: https://reviews.apache.org/r/66368/diff/1/


Testing
---

qtests added.


Thanks,

Jason Dere



Re: Review Request 66349: HIVE-19059 Support DEFAULT keyword with INSERT and UPDATE

2018-03-29 Thread Jesús Camacho Rodríguez

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




ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Lines 647 (patched)


Extract the information from the UDF instead of hardcoding the name:

final String inlineFunctionName = 
GenericUDTFInline.class.getAnnotation(Description.class).name();



ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Lines 650 (patched)


Same for array function.



ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Lines 683 (patched)


No need for check, if colName is not present it will return null.



ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Lines 693 (patched)


No need for check, if fs.getName is not present it will return null.



ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Lines 717 (patched)


You can inline instantiation _newNode = new 
ParseDriver().parseExpression(newValue);_



ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Lines 736 (patched)


We can be more aggressive here to prevent any undesired state in the 
future. Pseudo:

if (selectExprs.getChild(0) != "ROW_ID") {
  throw new SemanticException("Unexpected element when replacing default 
keyword for update. Expected ROW_ID, found: " + selectExprs.getChild(0));
}



ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Lines 746 (patched)


Can we leave a LOG.debug message "inserted default for x: y" or something 
alike?



ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Lines 763 (patched)


We can be aggressive here too.



ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Lines 772 (patched)


Can we leave a LOG.debug message "inserted default for x: y" or something 
alike?



ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Lines 779 (patched)


Can we refactor this so we call _isValueClause_ and _updating_ functions 
only once (trying to avoid some overhead)?


- Jesús Camacho Rodríguez


On March 29, 2018, 12:14 a.m., Vineet Garg wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66349/
> ---
> 
> (Updated March 29, 2018, 12:14 a.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan and Jesús Camacho Rodríguez.
> 
> 
> Bugs: HIVE-19059
> https://issues.apache.org/jira/browse/HIVE-19059
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> This patch adds support for specifying DEFAULT keyword with INSERT and UPDATE 
> e.g.
> INSERT INTO T1 values(DEFAULT, DEFAULT..)
> 
> 
> Diffs
> -
> 
>   itests/src/test/resources/testconfiguration.properties 5985dcfab9 
>   ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
> 26f20f2e05 
>   ql/src/test/queries/clientpositive/insert_into_default_keyword.q 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/llap/insert_into_default_keyword.q.out 
> PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/66349/diff/2/
> 
> 
> Testing
> ---
> 
> Added more tests
> Existing pcommit tests
> 
> 
> Thanks,
> 
> Vineet Garg
> 
>



[jira] [Created] (HIVE-19078) Add separate option to display query explain on HS2

2018-03-29 Thread Zoltan Haindrich (JIRA)
Zoltan Haindrich created HIVE-19078:
---

 Summary: Add separate option to display query explain on HS2
 Key: HIVE-19078
 URL: https://issues.apache.org/jira/browse/HIVE-19078
 Project: Hive
  Issue Type: Improvement
Reporter: Zoltan Haindrich


currently the same option (ConfVars.HIVE_LOG_EXPLAIN_OUTPUT) controls both 
explain print to console; and display on hs2 ; seeing it also on the console 
eats up scroll space very fast

https://github.com/apache/hive/blob/b750a16be5a8e378ac11a88ace244e826d23cfe5/ql/src/java/org/apache/hadoop/hive/ql/Driver.java#L684



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (HIVE-19077) Handle duplicate ptests requests standing in queue at the same time

2018-03-29 Thread Adam Szita (JIRA)
Adam Szita created HIVE-19077:
-

 Summary: Handle duplicate ptests requests standing in queue at the 
same time
 Key: HIVE-19077
 URL: https://issues.apache.org/jira/browse/HIVE-19077
 Project: Hive
  Issue Type: Improvement
  Components: Testing Infrastructure
Reporter: Adam Szita
Assignee: Adam Szita


I've been keeping on eye on our {{PreCommit-HIVE-Build}} job, and what I 
noticed that sometimes huge queues can build up, that contain jira's more than 
once. (Yesterday I've seen a queue of 40, having 31 distinct jiras..)

Simple scenario is that I upload a patch, it gets queued for ptest (already 
long queue), and 3 hours later I will update it, re-upload and re-queue. Now 
the current ptest infra seems to be smart enough to always deal with the latest 
patch, so what will happen is that the same patch will be tested 2 times (with 
~3 hours) diff, most probably with same result.

I propose we do some deduplication - if ptest starts running the request for 
Jira X, then it can take a look on the current queue, and see if X is there 
again. If so, it can skip for now, it will be picked up later anyway.

In practice this means that if you reconsider your patch and update it, your 
original place in the queue will be gone (like as a penalty for changing it), 
but overall it saves resources for the whole community.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: Review Request 66356: HIVE-19075: Fix NPE when trying to drop or get DB with null name

2018-03-29 Thread Peter Vary via Review Board

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


Ship it!




Ship It!

- Peter Vary


On March 29, 2018, 9:54 a.m., Marta Kuczora wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66356/
> ---
> 
> (Updated March 29, 2018, 9:54 a.m.)
> 
> 
> Review request for hive, Peter Vary and Adam Szita.
> 
> 
> Bugs: HIVE-19075
> https://issues.apache.org/jira/browse/HIVE-19075
> 
> 
> Repository: hive-git
> 
> 
> Description
> ---
> 
> The TestDatabases tests revealed that NPE is thrown if the get_database_core 
> and drop_database_core methods are called with null DB name. These NPEs could 
> be prevented with a simple null check and a MetaException with a proper error 
> message should be thrown instead.
> 
> Example: NPE is thrown in the following test cases
> - TestDatabases.testGetDatabaseNullName
> - TestDatabases.testDropDatabaseNullName
> 
> 
> Diffs
> -
> 
>   
> standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
>  8a5de09 
>   
> standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDatabases.java
>  f2d745e 
> 
> 
> Diff: https://reviews.apache.org/r/66356/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Marta Kuczora
> 
>



Review Request 66359: HIVE-19076: Fix NPE and TApplicationException in function related HiveMetastore methods

2018-03-29 Thread Marta Kuczora via Review Board

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

Review request for hive, Peter Vary and Adam Szita.


Bugs: HIVE-19076
https://issues.apache.org/jira/browse/HIVE-19076


Repository: hive-git


Description
---

The TestFunctions tests revealed that NPE is thrown in some cases. These NPEs 
could be prevented with a simple null check and a MetaException with a proper 
error message should be thrown instead.

Also there are some alter function tests where InvalidObjectException is thrown 
with Embedded MetaStore, but TApplicationException it thrown with Remote 
MetaStore. The reason is that the InvalidObjectException is not defined for the 
alter_function method in the thrift interface, so we got the 
TApplicationException when the InvalidObjectException was thrown. In these 
cases the InvalidObjectException could be handled on the server side and 
re-throw it as a MetaException


Diffs
-

  
standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
 8a5de09 
  
standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestFunctions.java
 d504f34 


Diff: https://reviews.apache.org/r/66359/diff/1/


Testing
---


Thanks,

Marta Kuczora



[jira] [Created] (HIVE-19076) Fix NPE and TApplicationException in function related HiveMetastore methods

2018-03-29 Thread Marta Kuczora (JIRA)
Marta Kuczora created HIVE-19076:


 Summary: Fix NPE and TApplicationException in function related 
HiveMetastore methods
 Key: HIVE-19076
 URL: https://issues.apache.org/jira/browse/HIVE-19076
 Project: Hive
  Issue Type: Bug
Reporter: Marta Kuczora
Assignee: Marta Kuczora


The TestFunctions tests revealed that NPE is thrown in some cases. These NPEs 
could be prevented with a simple null check and a MetaException with a proper 
error message should be thrown instead.
Example: NPE is thrown in the following test cases
 * testCreateFunctionNullFunctionName
 * testCreateFunctionNullDatabaseName
 * testCreateFunctionNullOwnerType
 * testCreateFunctionNullFunctionType
 * testGetFunctionNullDatabase
 * testDropFunctionNullDatabase
 * testDropFunctionNullFunctionName
 * testAlterFunctionNullDatabase
 * testAlterFunctionNullFunctionName
 * testAlterFunctionNullFunction
 * testAlterFunctionNullFunctionNameInNew
 * testAlterFunctionNullDatabaseNameInNew
 * testAlterFunctionNullOwnerTypeInNew
 * testAlterFunctionNullFunctionTypeInNew

Also there are some alter function tests where InvalidObjectException is thrown 
with Embedded MetaStore, but TApplicationException it thrown with Remote 
MetaStore. The reason is that the InvalidObjectException is not defined for the 
alter_function method in the thrift interface, so we got the 
TApplicationException when the InvalidObjectException was thrown.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Review Request 66356: HIVE-19075: Fix NPE when trying to drop or get DB with null name

2018-03-29 Thread Marta Kuczora via Review Board

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

Review request for hive, Peter Vary and Adam Szita.


Bugs: HIVE-19075
https://issues.apache.org/jira/browse/HIVE-19075


Repository: hive-git


Description
---

The TestDatabases tests revealed that NPE is thrown if the get_database_core 
and drop_database_core methods are called with null DB name. These NPEs could 
be prevented with a simple null check and a MetaException with a proper error 
message should be thrown instead.

Example: NPE is thrown in the following test cases
- TestDatabases.testGetDatabaseNullName
- TestDatabases.testDropDatabaseNullName


Diffs
-

  
standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
 8a5de09 
  
standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDatabases.java
 f2d745e 


Diff: https://reviews.apache.org/r/66356/diff/1/


Testing
---


Thanks,

Marta Kuczora



[jira] [Created] (HIVE-19075) Fix NPE when trying to drop or get DB with null name

2018-03-29 Thread Marta Kuczora (JIRA)
Marta Kuczora created HIVE-19075:


 Summary: Fix NPE when trying to drop or get DB with null name
 Key: HIVE-19075
 URL: https://issues.apache.org/jira/browse/HIVE-19075
 Project: Hive
  Issue Type: Bug
  Components: Metastore
Reporter: Marta Kuczora
Assignee: Marta Kuczora


The TestDatabases tests revealed that NPE is thrown if the get_database_core 
and drop_database_core methods are called with null DB name. These NPEs could 
be prevented with a simple null check and a MetaException with a proper error 
message should be thrown instead.
Example: NPE is thrown in the following test cases
 * TestDatabases.testGetDatabaseNullName
 * TestDatabases.testDropDatabaseNullName



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[VOTE] Apache Hive 2.3.3 Release Candidate 0

2018-03-29 Thread Daniel Dai
Apache Hive 2.3.3 Release Candidate 0 is available here:

http://people.apache.org/~daijy/apache-hive-2.3.3-rc-0/

Maven artifacts are available here:

https://repository.apache.org/content/repositories/orgapachehive-1084/

Source tag for RCN is at:
https://github.com/apache/hive/tree/release-2.3.3-rc0

Voting will conclude in 72 hours.

Hive PMC Members: Please test and vote.

Thanks.


[GitHub] hive pull request #328: Hive-18841

2018-03-29 Thread thejasmn
GitHub user thejasmn opened a pull request:

https://github.com/apache/hive/pull/328

Hive-18841 



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/thejasmn/hive HIVE-18841-funcregistry

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/hive/pull/328.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #328


commit 6a978f6828e736a605dbc84c457564722b48dacc
Author: Thejas M Nair 
Date:   2018-03-28T18:40:14Z

compiles, should work!

commit 21e2902b11f56e18a590e112c18b32ddad55cc9a
Author: Thejas M Nair 
Date:   2018-03-29T05:38:55Z

add and fix tests

commit 9a7d071830c07bd1c03b1051171b5df0875f8679
Author: Thejas M Nair 
Date:   2018-03-29T07:23:51Z

adding more tests




---


[jira] [Created] (HIVE-19074) Vectorization: Add llap vectorization_div0.q.out Q output file

2018-03-29 Thread Matt McCline (JIRA)
Matt McCline created HIVE-19074:
---

 Summary: Vectorization: Add llap vectorization_div0.q.out Q output 
file
 Key: HIVE-19074
 URL: https://issues.apache.org/jira/browse/HIVE-19074
 Project: Hive
  Issue Type: Bug
Reporter: Matt McCline
Assignee: Matt McCline


At some point llap/vectorization_div0.q.out got omitted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)