[jira] [Updated] (HIVE-11749) To sometimes deadlock when run a query

2015-09-06 Thread Ryu Kobayashi (JIRA)

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

Ryu Kobayashi updated HIVE-11749:
-
Attachment: HIVE-11749.stack-tarace.txt

> To sometimes deadlock when run a query
> --
>
> Key: HIVE-11749
> URL: https://issues.apache.org/jira/browse/HIVE-11749
> Project: Hive
>  Issue Type: Bug
>Affects Versions: 0.13.0
>Reporter: Ryu Kobayashi
> Attachments: HIVE-11749.stack-tarace.txt
>
>
> But not always, to deadlock when it run the query. Environment are as follows:
> * Hadoop 2.6.0
> * Hive 0.13
> * JDK 1.7.0_79
> It will attach the stack trace.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-11717) nohup mode is not support for new hive cli

2015-09-06 Thread Ferdinand Xu (JIRA)

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

Ferdinand Xu commented on HIVE-11717:
-

Thanks [~nemon] for this useful information.

> nohup mode is not support for new hive cli
> --
>
> Key: HIVE-11717
> URL: https://issues.apache.org/jira/browse/HIVE-11717
> Project: Hive
>  Issue Type: Sub-task
>  Components: Beeline
>Reporter: Ferdinand Xu
>
> We are able use below hive command to run query file in batch mode.
> {noformat}
> nohup hive -S -f /home/wj19670/pad.sql >pad.csv &
> {noformat}
> However under new hive cli,  we aren't able to use nohup anymore since it 
> uses jline in the backend.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-11717) nohup mode is not support for new hive cli

2015-09-06 Thread Ferdinand Xu (JIRA)

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

Ferdinand Xu updated HIVE-11717:

Description: 
We are able use below hive command to run query file in batch mode.
{noformat}
nohup hive -S -f /home/wj19670/pad.sql >pad.csv &
{noformat}
However under new hive cli,  we aren't able to use nohup anymore since it uses 
jline in the backend.

  was:
We are able use below hive command to run query file in batch mode.
{noformat}
nohup hive -S -f /home/wj19670/pad.sql >pad.csv &
{noformat}
However under beeline,  we aren't able to use nohup anymore.


> nohup mode is not support for new hive cli
> --
>
> Key: HIVE-11717
> URL: https://issues.apache.org/jira/browse/HIVE-11717
> Project: Hive
>  Issue Type: Sub-task
>  Components: Beeline
>Reporter: Ferdinand Xu
>
> We are able use below hive command to run query file in batch mode.
> {noformat}
> nohup hive -S -f /home/wj19670/pad.sql >pad.csv &
> {noformat}
> However under new hive cli,  we aren't able to use nohup anymore since it 
> uses jline in the backend.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-11717) nohup mode is not support for new hive cli

2015-09-06 Thread Ferdinand Xu (JIRA)

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

Ferdinand Xu updated HIVE-11717:

Summary: nohup mode is not support for new hive cli  (was: nohup mode is 
not support for beeline)

> nohup mode is not support for new hive cli
> --
>
> Key: HIVE-11717
> URL: https://issues.apache.org/jira/browse/HIVE-11717
> Project: Hive
>  Issue Type: Sub-task
>  Components: Beeline
>Reporter: Ferdinand Xu
>
> We are able use below hive command to run query file in batch mode.
> {noformat}
> nohup hive -S -f /home/wj19670/pad.sql >pad.csv &
> {noformat}
> However under beeline,  we aren't able to use nohup anymore.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-11717) nohup mode is not support for beeline

2015-09-06 Thread Nemon Lou (JIRA)

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

Nemon Lou commented on HIVE-11717:
--

Same as HIVE-6758,and a workaround was provided there:
{quote}
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS 
-Djline.terminal=jline.UnsupportedTerminal"
{quote}
Hope it helps.

> nohup mode is not support for beeline
> -
>
> Key: HIVE-11717
> URL: https://issues.apache.org/jira/browse/HIVE-11717
> Project: Hive
>  Issue Type: Sub-task
>  Components: Beeline
>Reporter: Ferdinand Xu
>
> We are able use below hive command to run query file in batch mode.
> {noformat}
> nohup hive -S -f /home/wj19670/pad.sql >pad.csv &
> {noformat}
> However under beeline,  we aren't able to use nohup anymore.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-11748) HivePreparedStatement's setTimestamp() does not quote value as required

2015-09-06 Thread Hive QA (JIRA)

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

Hive QA commented on HIVE-11748:




{color:red}Overall{color}: -1 at least one tests failed

Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12754399/HIVE-11748.patch

{color:red}ERROR:{color} -1 due to 5 failed/errored test(s), 9421 tests executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_stats_counter
org.apache.hive.hcatalog.api.TestHCatClient.testTableSchemaPropagation
org.apache.hive.hcatalog.streaming.TestStreaming.testEndpointConnection
org.apache.hive.hcatalog.streaming.TestStreaming.testTimeOutReaper
org.apache.hive.jdbc.TestJdbcDriver2.testPrepareSetTimestamp
{noformat}

Test results: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/5190/testReport
Console output: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/5190/console
Test logs: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-5190/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 5 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12754399 - PreCommit-HIVE-TRUNK-Build

> HivePreparedStatement's setTimestamp() does not quote value as required
> ---
>
> Key: HIVE-11748
> URL: https://issues.apache.org/jira/browse/HIVE-11748
> Project: Hive
>  Issue Type: Bug
>  Components: JDBC
>Reporter: Angus Smithson
> Attachments: HIVE-11748.patch
>
>
> [HivePreparedStatement.setTimestamp(int parameterIndex, Timestamp 
> x)|https://hive.apache.org/javadocs/r1.2.1/api/org/apache/hive/jdbc/HivePreparedStatement.html#setTimestamp(int,%20java.sql.Timestamp)]
>  does not quote the Timestamp value when generating the HQL statement, 
> resulting in a HiveSqlException on execution.
> h5. Reproducing
> If we add the following unit test to 
> {{itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java}}:
> {code}
>   @Test
>   public void testPrepareSetTimestamp() throws SQLException, ParseException {
> String sql = String.format("SELECT * FROM %s WHERE c20 = ?", 
> dataTypeTableName);
> try (PreparedStatement ps = con.prepareStatement(sql)) {
>   Timestamp timestamp = new Timestamp(new 
> SimpleDateFormat("-MM-dd").parse("2013-01-01").getTime());
>   ps.setTimestamp(1, timestamp);
>   try (ResultSet resultSet = ps.executeQuery()) {
> assertTrue(resultSet.next());
> assertEquals("2013-01-01", resultSet.getString(20));
>   }
> }
>   }
> {code}
> The test fails:
> {noformat}
> org.apache.hive.service.cli.HiveSQLException: Error while compiling 
> statement: FAILED: ParseException line 1:55 cannot recognize input near '00' 
> ':' '00' in expression specification
>   at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:205)
>   at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:401)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:310)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1150)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1136)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:109)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:180)
>   at 
> org.apache.hive.service.cli.operation.Operation.run(Operation.java:257)
>   at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:405)
>   at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:392)
>   at 
> org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:261)
>   at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:509)
>   at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.apache.hive.jdbc.HiveConnection$SynchronizedHandler.invoke(HiveConnection.java:1400)
>   at com.sun.proxy.$Proxy32.ExecuteStatement(Unknown Source)
>   at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:246)
>   at 
> org.apache.hive.jdbc.HiveStatement.ex

[jira] [Updated] (HIVE-11748) HivePreparedStatement's setTimestamp() does not quote value as required

2015-09-06 Thread Angus Smithson (JIRA)

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

Angus Smithson updated HIVE-11748:
--
Description: 
[HivePreparedStatement.setTimestamp(int parameterIndex, Timestamp 
x)|https://hive.apache.org/javadocs/r1.2.1/api/org/apache/hive/jdbc/HivePreparedStatement.html#setTimestamp(int,%20java.sql.Timestamp)]
 does not quote the Timestamp value when generating the HQL statement, 
resulting in a HiveSqlException on execution.

h5. Reproducing
If we add the following unit test to 
{{itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java}}:
{code}
  @Test
  public void testPrepareSetTimestamp() throws SQLException, ParseException {
String sql = String.format("SELECT * FROM %s WHERE c20 = ?", 
dataTypeTableName);
try (PreparedStatement ps = con.prepareStatement(sql)) {
  Timestamp timestamp = new Timestamp(new 
SimpleDateFormat("-MM-dd").parse("2013-01-01").getTime());
  ps.setTimestamp(1, timestamp);
  try (ResultSet resultSet = ps.executeQuery()) {
assertTrue(resultSet.next());
assertEquals("2013-01-01", resultSet.getString(20));
  }
}
  }
{code}

The test fails:
{noformat}
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: 
FAILED: ParseException line 1:55 cannot recognize input near '00' ':' '00' in 
expression specification
  at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:205)
  at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:401)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:310)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1150)
at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1136)
at 
org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:109)
at 
org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:180)
at 
org.apache.hive.service.cli.operation.Operation.run(Operation.java:257)
at 
org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:405)
at 
org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:392)
at 
org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:261)
at 
org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:509)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.apache.hive.jdbc.HiveConnection$SynchronizedHandler.invoke(HiveConnection.java:1400)
at com.sun.proxy.$Proxy32.ExecuteStatement(Unknown Source)
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:246)
at 
org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:378)
at 
org.apache.hive.jdbc.HivePreparedStatement.executeQuery(HivePreparedStatement.java:109)
at 
org.apache.hive.jdbc.TestJdbcDriver2.testPrepareSetTimestamp(TestJdbcDriver2.java:2395)
{noformat}

The failure is because the following HQL is generated/executed by calling 
toString() on the Timestamp value:
{noformat}
SELECT * FROM testdatatypetable WHERE c20 = 2013-01-01 00:00:00.0
{noformat}

We should be quoting the value of Timestamp.toString(), so that the following 
HQL is generated/executed:
{noformat}
SELECT * FROM testdatatypetable WHERE c20 = '2013-01-01 00:00:00.0'
{noformat}

  was:
[HivePreparedStatement.setTimestamp(int parameterIndex, Timestamp 
x)|https://hive.apache.org/javadocs/r1.2.1/api/org/apache/hive/jdbc/HivePreparedStatement.html#setTimestamp(int,%20java.sql.Timestamp)]
 does not quote the Timestamp value when generating the HQL statement, 
resulting in a HiveSqlException on execution.

h5. Reproducing
If we add the following unit test to 
{{itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java}}:
{code}
  @Test
  public void testPrepareSetTimestamp() throws SQLException, ParseException {
String sql = String.format("SELECT * FROM %s WHERE c20 = ?", 
dataTypeTableName);
try (PreparedStatement ps = con.prepareStatement(sql)) {
  Timestamp timestamp = new Timestamp(new 
SimpleDateFormat("-MM-dd").parse("2013-01-01").getTime());
  ps.setTimestamp(1, timestamp);
  try (ResultSet resultSet = ps.executeQuery()) {
assertTrue(resultSet.next());
assertEquals("2013-01-01", resultSet.getString(20));
  }
}
  }
{code}

The test fails:
{noformat}
org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: 
FAILED: ParseException line 1:55 cannot recognize input near '00' ':' '00' in 
expression speci

[jira] [Updated] (HIVE-11748) HivePreparedStatement's setTimestamp() does not quote value as required

2015-09-06 Thread Angus Smithson (JIRA)

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

Angus Smithson updated HIVE-11748:
--
Attachment: HIVE-11748.patch

Attaching HIVE-11748.patch.  This is similar to the changes under HIVE-11024, 
which fixed the same bug in setDate().  It simply quotes the value of 
Timestamp.toString().
{noformat}
diff --git jdbc/src/java/org/apache/hive/jdbc/HivePreparedStatement.java 
jdbc/src/java/org/apache/hive/jdbc/HivePreparedStatement.java
index 7687537..81c3d5d 100644
--- jdbc/src/java/org/apache/hive/jdbc/HivePreparedStatement.java
+++ jdbc/src/java/org/apache/hive/jdbc/HivePreparedStatement.java
@@ -728,7 +728,7 @@ public void setTime(int parameterIndex, Time x, Calendar 
cal) throws SQLExceptio
*/
 
   public void setTimestamp(int parameterIndex, Timestamp x) throws 
SQLException {
-this.parameters.put(parameterIndex, x.toString());
+this.parameters.put(parameterIndex, "'" + x.toString() + "'");
   }
 
   /*
{noformat}

I've also added a unit test and some Dell SecureWorks license information to 
the NOTICE file.

> HivePreparedStatement's setTimestamp() does not quote value as required
> ---
>
> Key: HIVE-11748
> URL: https://issues.apache.org/jira/browse/HIVE-11748
> Project: Hive
>  Issue Type: Bug
>  Components: JDBC
>Reporter: Angus Smithson
> Attachments: HIVE-11748.patch
>
>
> [HivePreparedStatement.setTimestamp(int parameterIndex, Timestamp 
> x)|https://hive.apache.org/javadocs/r1.2.1/api/org/apache/hive/jdbc/HivePreparedStatement.html#setTimestamp(int,%20java.sql.Timestamp)]
>  does not quote the Timestamp value when generating the HQL statement, 
> resulting in a HiveSqlException on execution.
> h5. Reproducing
> If we add the following unit test to 
> {{itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java}}:
> {code}
>   @Test
>   public void testPrepareSetTimestamp() throws SQLException, ParseException {
> String sql = String.format("SELECT * FROM %s WHERE c20 = ?", 
> dataTypeTableName);
> try (PreparedStatement ps = con.prepareStatement(sql)) {
>   Timestamp timestamp = new Timestamp(new 
> SimpleDateFormat("-MM-dd").parse("2013-01-01").getTime());
>   ps.setTimestamp(1, timestamp);
>   try (ResultSet resultSet = ps.executeQuery()) {
> assertTrue(resultSet.next());
> assertEquals("2013-01-01", resultSet.getString(20));
>   }
> }
>   }
> {code}
> The test fails:
> {noformat}
> org.apache.hive.service.cli.HiveSQLException: Error while compiling 
> statement: FAILED: ParseException line 1:55 cannot recognize input near '00' 
> ':' '00' in expression specification
>   at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:205)
>   at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:401)
>   at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:310)
>   at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1150)
>   at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1136)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:109)
>   at 
> org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:180)
>   at 
> org.apache.hive.service.cli.operation.Operation.run(Operation.java:257)
>   at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:405)
>   at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:392)
>   at 
> org.apache.hive.service.cli.CLIService.executeStatementAsync(CLIService.java:261)
>   at 
> org.apache.hive.service.cli.thrift.ThriftCLIService.ExecuteStatement(ThriftCLIService.java:509)
>   at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.lang.reflect.Method.invoke(Method.java:606)
>   at 
> org.apache.hive.jdbc.HiveConnection$SynchronizedHandler.invoke(HiveConnection.java:1400)
>   at com.sun.proxy.$Proxy32.ExecuteStatement(Unknown Source)
>   at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:246)
>   at 
> org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:378)
>   at 
> org.apache.hive.jdbc.HivePreparedStatement.executeQuery(HivePreparedStatement.java:109)
>   at 
> org.apache.hive.jdbc.TestJdbcDriver2.testPrepareSetTimestamp(TestJdbcDriver2.java:2395)
> {noformat}
> The failure is because the following HQL is generated/executed by calling 
> toString() on the Timestamp value:
> {noformat}
> SELECT * FROM %s WHERE c20 = 2013-01-01 00:00:00.0
> {n

[jira] [Updated] (HIVE-11735) Different results when multiple if() functions are used

2015-09-06 Thread Chetna Chaudhari (JIRA)

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

Chetna Chaudhari updated HIVE-11735:

Attachment: HIVE-11735.patch

Attaching patch for the suggested approach. Please review it. 

> Different results when multiple if() functions are used 
> 
>
> Key: HIVE-11735
> URL: https://issues.apache.org/jira/browse/HIVE-11735
> Project: Hive
>  Issue Type: Bug
>Reporter: Chetna Chaudhari
>Assignee: Chetna Chaudhari
> Attachments: HIVE-11735.patch
>
>
> Hive if() udf is returns different results when string equality is used as 
> condition, with case change. 
> Observation:
>1) if( name = 'chetna' , 3, 4) and if( name = 'Chetna', 3, 4) both are 
> treated as equal.
>2) The rightmost udf result is pushed to predicates on left side. Leading 
> to same result for both the udfs.
> How to reproduce the issue:
> 1) CREATE TABLE `sample`(
>   `name` string)
> ROW FORMAT SERDE
>   'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
> STORED AS INPUTFORMAT
>   'org.apache.hadoop.mapred.TextInputFormat'
> OUTPUTFORMAT
>   'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
> TBLPROPERTIES (
>   'transient_lastDdlTime'='1425075745');
> 2) insert into table sample values ('chetna');
> 3) select min(if(name = 'chetna', 4, 3)) , min(if(name='Chetna', 4, 3))  from 
> sample; 
> This will give result : 
> 33
> Expected result:
> 43
> 4) select min(if(name = 'Chetna', 4, 3)) , min(if(name='chetna', 4, 3))  from 
> sample; 
> This will give result 
> 44
> Expected result:
> 34



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-11735) Different results when multiple if() functions are used

2015-09-06 Thread Chetna Chaudhari (JIRA)

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

Chetna Chaudhari commented on HIVE-11735:
-

Issue is occurring while generating OPTree . 
Causes:
1) lowercase conversion of table and column aliases in RowResolver class.
2) Also in genSelectPlan, the aggregations are first converted to lowercase and 
then added to aggregations map.

Removing the toLowerCase() call from mentioned places resolved the issue for 
group by aggregations. 
Note this issue will happen in case of all aggregations, joins and select, the 
same logic is there for other operators too.
Would like to contribute the patch if everyone agrees on the change. 

> Different results when multiple if() functions are used 
> 
>
> Key: HIVE-11735
> URL: https://issues.apache.org/jira/browse/HIVE-11735
> Project: Hive
>  Issue Type: Bug
>Reporter: Chetna Chaudhari
>Assignee: Chetna Chaudhari
>
> Hive if() udf is returns different results when string equality is used as 
> condition, with case change. 
> Observation:
>1) if( name = 'chetna' , 3, 4) and if( name = 'Chetna', 3, 4) both are 
> treated as equal.
>2) The rightmost udf result is pushed to predicates on left side. Leading 
> to same result for both the udfs.
> How to reproduce the issue:
> 1) CREATE TABLE `sample`(
>   `name` string)
> ROW FORMAT SERDE
>   'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
> STORED AS INPUTFORMAT
>   'org.apache.hadoop.mapred.TextInputFormat'
> OUTPUTFORMAT
>   'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
> TBLPROPERTIES (
>   'transient_lastDdlTime'='1425075745');
> 2) insert into table sample values ('chetna');
> 3) select min(if(name = 'chetna', 4, 3)) , min(if(name='Chetna', 4, 3))  from 
> sample; 
> This will give result : 
> 33
> Expected result:
> 43
> 4) select min(if(name = 'Chetna', 4, 3)) , min(if(name='chetna', 4, 3))  from 
> sample; 
> This will give result 
> 44
> Expected result:
> 34



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (HIVE-11735) Different results when multiple if() functions are used

2015-09-06 Thread Chetna Chaudhari (JIRA)

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

Chetna Chaudhari reassigned HIVE-11735:
---

Assignee: Chetna Chaudhari

> Different results when multiple if() functions are used 
> 
>
> Key: HIVE-11735
> URL: https://issues.apache.org/jira/browse/HIVE-11735
> Project: Hive
>  Issue Type: Bug
>Reporter: Chetna Chaudhari
>Assignee: Chetna Chaudhari
>
> Hive if() udf is returns different results when string equality is used as 
> condition, with case change. 
> Observation:
>1) if( name = 'chetna' , 3, 4) and if( name = 'Chetna', 3, 4) both are 
> treated as equal.
>2) The rightmost udf result is pushed to predicates on left side. Leading 
> to same result for both the udfs.
> How to reproduce the issue:
> 1) CREATE TABLE `sample`(
>   `name` string)
> ROW FORMAT SERDE
>   'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
> STORED AS INPUTFORMAT
>   'org.apache.hadoop.mapred.TextInputFormat'
> OUTPUTFORMAT
>   'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
> TBLPROPERTIES (
>   'transient_lastDdlTime'='1425075745');
> 2) insert into table sample values ('chetna');
> 3) select min(if(name = 'chetna', 4, 3)) , min(if(name='Chetna', 4, 3))  from 
> sample; 
> This will give result : 
> 33
> Expected result:
> 43
> 4) select min(if(name = 'Chetna', 4, 3)) , min(if(name='chetna', 4, 3))  from 
> sample; 
> This will give result 
> 44
> Expected result:
> 34



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-11711) Merge hbase-metastore branch to trunk

2015-09-06 Thread Hive QA (JIRA)

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

Hive QA commented on HIVE-11711:




{color:red}Overall{color}: -1 at least one tests failed

Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12754369/HIVE-11711.6.patch

{color:red}ERROR:{color} -1 due to 2 failed/errored test(s), 9538 tests executed
*Failed tests:*
{noformat}
org.apache.hive.hcatalog.api.TestHCatClient.testTableSchemaPropagation
org.apache.hive.hcatalog.streaming.TestStreaming.testInterleavedTransactionBatchCommits
{noformat}

Test results: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/5189/testReport
Console output: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/5189/console
Test logs: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-5189/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 2 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12754369 - PreCommit-HIVE-TRUNK-Build

> Merge hbase-metastore branch to trunk
> -
>
> Key: HIVE-11711
> URL: https://issues.apache.org/jira/browse/HIVE-11711
> Project: Hive
>  Issue Type: Sub-task
>  Components: HBase Metastore
>Reporter: Daniel Dai
>Assignee: Daniel Dai
> Fix For: 2.0.0
>
> Attachments: HIVE-11711.1.patch, HIVE-11711.2.patch, 
> HIVE-11711.3.patch, HIVE-11711.4.patch, HIVE-11711.5.patch, HIVE-11711.6.patch
>
>
> Major development of hbase-metastore is done and it's time to merge the 
> branch back into master.
> Currently hbase-metastore is only invoked when running TestMiniTezCliDriver. 
> The instruction for setting up hbase-metastore is captured in 
> https://cwiki.apache.org/confluence/display/Hive/HBaseMetastoreDevelopmentGuide.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HIVE-11747) Unnecessary error log is shown when executing a "INSERT OVERWRITE LOCAL DIRECTORY" cmd in the embedded mode

2015-09-06 Thread Hive QA (JIRA)

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

Hive QA commented on HIVE-11747:




{color:red}Overall{color}: -1 at least one tests failed

Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12754366/HIVE-11747.patch

{color:red}ERROR:{color} -1 due to 3 failed/errored test(s), 9420 tests executed
*Failed tests:*
{noformat}
org.apache.hadoop.hive.cli.TestMinimrCliDriver.testCliDriver_index_bitmap_auto
org.apache.hive.hcatalog.api.TestHCatClient.testTableSchemaPropagation
org.apache.hive.hcatalog.streaming.TestStreaming.testEndpointConnection
{noformat}

Test results: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/5188/testReport
Console output: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/5188/console
Test logs: 
http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-5188/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
Tests exited with: TestsFailedException: 3 tests failed
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12754366 - PreCommit-HIVE-TRUNK-Build

> Unnecessary error log is shown when executing a "INSERT OVERWRITE LOCAL 
> DIRECTORY" cmd in the embedded mode
> ---
>
> Key: HIVE-11747
> URL: https://issues.apache.org/jira/browse/HIVE-11747
> Project: Hive
>  Issue Type: Bug
>Reporter: Ferdinand Xu
>Assignee: Ferdinand Xu
>Priority: Minor
> Attachments: HIVE-11747.patch
>
>
> The  ”INSERT OVERWRITE LOCAL DIRECTORY“ task runs successfully while some 
> error logs are thrown.
> {noformat}
> Connected to: Apache Hive (version 2.0.0-SNAPSHOT)
> Driver: Hive JDBC (version 2.0.0-SNAPSHOT)
> Transaction isolation: TRANSACTION_REPEATABLE_READ
> Beeline version 2.0.0-SNAPSHOT by Apache Hive
> hive> INSERT OVERWRITE LOCAL DIRECTORY '/nullformat' ROW FORMAT DELIMITED 
> NULL DEFINED AS 'fooNull' SELECT a,b FROM base_tab;
> 18:35:51.288 [HiveServer2-Background-Pool: Thread-25] ERROR 
> org.apache.hadoop.hive.ql.exec.mr.ExecDriver - yarn
> No rows affected (14.372 seconds)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HIVE-11711) Merge hbase-metastore branch to trunk

2015-09-06 Thread Daniel Dai (JIRA)

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

Daniel Dai updated HIVE-11711:
--
Attachment: HIVE-11711.6.patch

> Merge hbase-metastore branch to trunk
> -
>
> Key: HIVE-11711
> URL: https://issues.apache.org/jira/browse/HIVE-11711
> Project: Hive
>  Issue Type: Sub-task
>  Components: HBase Metastore
>Reporter: Daniel Dai
>Assignee: Daniel Dai
> Fix For: 2.0.0
>
> Attachments: HIVE-11711.1.patch, HIVE-11711.2.patch, 
> HIVE-11711.3.patch, HIVE-11711.4.patch, HIVE-11711.5.patch, HIVE-11711.6.patch
>
>
> Major development of hbase-metastore is done and it's time to merge the 
> branch back into master.
> Currently hbase-metastore is only invoked when running TestMiniTezCliDriver. 
> The instruction for setting up hbase-metastore is captured in 
> https://cwiki.apache.org/confluence/display/Hive/HBaseMetastoreDevelopmentGuide.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (HIVE-10810) Document Beeline/CLI changes

2015-09-06 Thread Ferdinand Xu (JIRA)

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

Ferdinand Xu resolved HIVE-10810.
-
Resolution: Fixed

> Document Beeline/CLI changes
> 
>
> Key: HIVE-10810
> URL: https://issues.apache.org/jira/browse/HIVE-10810
> Project: Hive
>  Issue Type: Sub-task
>  Components: CLI
>Reporter: Xuefu Zhang
>Assignee: Ferdinand Xu
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)