[hive] branch branch-2.3 updated: HIVE-23086 Two tests fail on branch-2.3 (gates, reviewed by jcamacho)

2020-03-31 Thread gates
This is an automated email from the ASF dual-hosted git repository.

gates pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/branch-2.3 by this push:
 new d142115  HIVE-23086 Two tests fail on branch-2.3 (gates, reviewed by 
jcamacho)
d142115 is described below

commit d1421155057d7c827802f65b65739bcd9902880a
Author: Alan Gates 
AuthorDate: Tue Mar 31 18:43:39 2020 -0700

HIVE-23086 Two tests fail on branch-2.3 (gates, reviewed by jcamacho)
---
 itests/src/test/resources/testconfiguration.properties | 1 -
 ql/src/test/queries/clientpositive/perf/query88.q  | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/itests/src/test/resources/testconfiguration.properties 
b/itests/src/test/resources/testconfiguration.properties
index d6aa101..bfbe714 100644
--- a/itests/src/test/resources/testconfiguration.properties
+++ b/itests/src/test/resources/testconfiguration.properties
@@ -609,7 +609,6 @@ minillaplocal.query.files=acid_globallimit.q,\
   uber_reduce.q,\
   udaf_collect_set_2.q,\
   udaf_all_keyword.q,\
-  union_fast_stats.q,\
   union_remove_26.q,\
   union_top_level.q,\
   vector_auto_smb_mapjoin_14.q,\
diff --git a/ql/src/test/queries/clientpositive/perf/query88.q 
b/ql/src/test/queries/clientpositive/perf/query88.q
index 2be814e..bb6ef6d 100644
--- a/ql/src/test/queries/clientpositive/perf/query88.q
+++ b/ql/src/test/queries/clientpositive/perf/query88.q
@@ -1,3 +1,5 @@
+set hive.strict.checks.cartesian.product=false;
+
 explain
 select  *
 from



[hive] branch master updated: HIVE-22842: Timestamp/date vectors in Arrow serializer should use correct calendar for value representation (Shubham Chaurasia, reviewed by Jesus Camacho Rodriguez)

2020-03-31 Thread jcamacho
This is an automated email from the ASF dual-hosted git repository.

jcamacho pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
 new eac25e7  HIVE-22842: Timestamp/date vectors in Arrow serializer should 
use correct calendar for value representation (Shubham Chaurasia, reviewed by 
Jesus Camacho Rodriguez)
eac25e7 is described below

commit eac25e711ea750bc52f41da7ed3c32bfe36d4f67
Author: Shubham Chaurasia 
AuthorDate: Tue Mar 31 08:11:19 2020 -0700

HIVE-22842: Timestamp/date vectors in Arrow serializer should use correct 
calendar for value representation (Shubham Chaurasia, reviewed by Jesus Camacho 
Rodriguez)

Close apache/hive#950
---
 .../java/org/apache/hadoop/hive/conf/HiveConf.java |   3 +
 .../jdbc/TestJdbcWithMiniLlapVectorArrowBatch.java | 476 +
 .../apache/hadoop/hive/ql/io/arrow/Serializer.java |  32 +-
 .../hadoop/hive/common/type/CalendarUtils.java |  14 +
 4 files changed, 522 insertions(+), 3 deletions(-)

diff --git a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 
b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
index 34df01e..73f185a 100644
--- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -4638,6 +4638,9 @@ public class HiveConf extends Configuration {
   "If LLAP external clients submits ORDER BY queries, force return a 
single split to guarantee reading\n" +
 "data out in ordered way. Setting this to false will let external 
clients read data out in parallel\n" +
 "losing the ordering (external clients are responsible for 
guaranteeing the ordering)"),
+
LLAP_EXTERNAL_CLIENT_USE_HYBRID_CALENDAR("hive.llap.external.client.use.hybrid.calendar",
+false,
+"Whether to use hybrid calendar for parsing of data/timestamps."),
 LLAP_ENABLE_GRACE_JOIN_IN_LLAP("hive.llap.enable.grace.join.in.llap", 
false,
 "Override if grace join should be allowed to run in llap."),
 
diff --git 
a/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlapVectorArrowBatch.java
 
b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlapVectorArrowBatch.java
new file mode 100644
index 000..bba599b
--- /dev/null
+++ 
b/itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniLlapVectorArrowBatch.java
@@ -0,0 +1,476 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hive.jdbc;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Lists;
+import org.apache.arrow.memory.BufferAllocator;
+import org.apache.arrow.vector.FieldVector;
+import org.apache.commons.collections4.MultiSet;
+import org.apache.commons.collections4.multiset.HashMultiSet;
+import org.apache.hadoop.hive.common.type.CalendarUtils;
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
+import org.apache.hadoop.hive.llap.LlapArrowRowInputFormat;
+import org.apache.hadoop.hive.llap.LlapBaseInputFormat;
+import org.apache.hadoop.hive.llap.Row;
+import org.apache.hadoop.hive.ql.io.arrow.ArrowWrapperWritable;
+import org.apache.hadoop.hive.ql.io.arrow.RootAllocatorFactory;
+import org.apache.hadoop.io.NullWritable;
+import org.apache.hadoop.mapred.InputFormat;
+import org.apache.hadoop.mapred.InputSplit;
+import org.apache.hadoop.mapred.JobConf;
+import org.apache.hadoop.mapred.RecordReader;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.List;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+import static 
org.apache.hadoop.hive.conf.HiveConf.ConfVars.HIVE_AVRO_PROLEPTIC_GREGORIAN_DEFAULT;
+import static 
org.apache.hadoop.hive.conf.HiveConf.ConfVars.HIVE_PARQUET_DATE_PROLEPTIC_GREGORIAN_DEFAULT;
+import static 
org.apache.hadoop.hive.conf.HiveConf.ConfVars.LLAP_EXTERNAL_CLIENT_USE_HYBRID_CALENDAR;
+import static org.junit.Assert.assertEquals;
+import static 

[hive] branch master updated: HIVE-23078: Remove HiveDriver SecurityManager Check (David Mollitor reviewed by Naveen Gangam)

2020-03-31 Thread dmollitor
This is an automated email from the ASF dual-hosted git repository.

dmollitor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
 new 3de2dc1  HIVE-23078: Remove HiveDriver SecurityManager Check (David 
Mollitor reviewed by Naveen Gangam)
3de2dc1 is described below

commit 3de2dc1cd5db015e3c0f43a2fb16faf19e14efd7
Author: David Mollitor 
AuthorDate: Tue Mar 31 09:21:45 2020 -0400

HIVE-23078: Remove HiveDriver SecurityManager Check (David Mollitor 
reviewed by Naveen Gangam)
---
 jdbc/src/java/org/apache/hive/jdbc/HiveDriver.java | 12 
 1 file changed, 12 deletions(-)

diff --git a/jdbc/src/java/org/apache/hive/jdbc/HiveDriver.java 
b/jdbc/src/java/org/apache/hive/jdbc/HiveDriver.java
index faa4d17..edd9e57 100644
--- a/jdbc/src/java/org/apache/hive/jdbc/HiveDriver.java
+++ b/jdbc/src/java/org/apache/hive/jdbc/HiveDriver.java
@@ -67,18 +67,6 @@ public class HiveDriver implements Driver {
*/
   private static final String PORT_PROPERTY_KEY = "PORT";
 
-
-  /**
-   *
-   */
-  public HiveDriver() {
-// TODO Auto-generated constructor stub
-SecurityManager security = System.getSecurityManager();
-if (security != null) {
-  security.checkWrite("foobah");
-}
-  }
-
   /**
* Checks whether a given url is in a valid format.
*



[hive] 01/02: HIVE-21851: FireEventResponse should include event id when available (Vihang Karajgaonkar, reviewed by Naveen Gangam)

2020-03-31 Thread vihangk1
This is an automated email from the ASF dual-hosted git repository.

vihangk1 pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hive.git

commit 7426703e60112937ed3749526fcfbfeda2bf2ace
Author: Vihang Karajgaonkar 
AuthorDate: Mon Mar 30 16:48:08 2020 -0700

HIVE-21851: FireEventResponse should include event id when available 
(Vihang Karajgaonkar, reviewed by Naveen Gangam)
---
 .../listener/TestDbNotificationListener.java   |  12 ++-
 .../gen/thrift/gen-cpp/hive_metastore_types.cpp|  34 ++-
 .../src/gen/thrift/gen-cpp/hive_metastore_types.h  |  15 ++-
 .../hive/metastore/api/FireEventResponse.java  | 112 -
 .../src/gen/thrift/gen-php/metastore/Types.php |  27 -
 .../src/gen/thrift/gen-py/hive_metastore/ttypes.py |  19 
 .../src/gen/thrift/gen-rb/hive_metastore_types.rb  |   3 +-
 .../hadoop/hive/metastore/HiveMetaStore.java   |   9 +-
 .../src/main/thrift/hive_metastore.thrift  |   2 +-
 9 files changed, 219 insertions(+), 14 deletions(-)

diff --git 
a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/TestDbNotificationListener.java
 
b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/TestDbNotificationListener.java
index 37b2bd8..bfb1982 100644
--- 
a/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/TestDbNotificationListener.java
+++ 
b/itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/listener/TestDbNotificationListener.java
@@ -47,6 +47,7 @@ import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
 import org.apache.hadoop.hive.metastore.api.FireEventRequest;
 import org.apache.hadoop.hive.metastore.api.FireEventRequestData;
+import org.apache.hadoop.hive.metastore.api.FireEventResponse;
 import org.apache.hadoop.hive.metastore.api.Function;
 import org.apache.hadoop.hive.metastore.api.FunctionType;
 import org.apache.hadoop.hive.metastore.api.InsertEventRequestData;
@@ -98,6 +99,7 @@ import org.apache.hadoop.hive.ql.session.SessionState;
 import org.apache.hive.hcatalog.api.repl.ReplicationV1CompatRule;
 import org.apache.hive.hcatalog.data.Pair;
 import org.junit.After;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Rule;
@@ -1047,7 +1049,10 @@ public class TestDbNotificationListener {
 rqst.setDbName(defaultDbName);
 rqst.setTableName(tblName);
 // Event 2
-msClient.fireListenerEvent(rqst);
+FireEventResponse response = msClient.fireListenerEvent(rqst);
+assertTrue("Event id must be set in the fireEvent response", 
response.isSetEventId());
+Assert.assertNotNull(response.getEventId());
+Assert.assertTrue(response.getEventId() != -1);
 
 // Get notifications from metastore
 NotificationEventResponse rsp = msClient.getNextNotification(firstEventId, 
0, null);
@@ -1116,7 +1121,10 @@ public class TestDbNotificationListener {
 rqst.setTableName(tblName);
 rqst.setPartitionVals(partCol1Vals);
 // Event 3
-msClient.fireListenerEvent(rqst);
+FireEventResponse response = msClient.fireListenerEvent(rqst);
+assertTrue("Event id must be set in the fireEvent response", 
response.isSetEventId());
+Assert.assertNotNull(response.getEventId());
+Assert.assertTrue(response.getEventId() != -1);
 
 // Get notifications from metastore
 NotificationEventResponse rsp = msClient.getNextNotification(firstEventId, 
0, null);
diff --git 
a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp 
b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
index 5f2948e..f3e5d3a 100644
--- a/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
+++ b/standalone-metastore/src/gen/thrift/gen-cpp/hive_metastore_types.cpp
@@ -22756,6 +22756,10 @@ FireEventResponse::~FireEventResponse() throw() {
 }
 
 
+void FireEventResponse::__set_eventId(const int64_t val) {
+  this->eventId = val;
+}
+
 uint32_t FireEventResponse::read(::apache::thrift::protocol::TProtocol* iprot) 
{
 
   apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
@@ -22775,7 +22779,20 @@ uint32_t 
FireEventResponse::read(::apache::thrift::protocol::TProtocol* iprot) {
 if (ftype == ::apache::thrift::protocol::T_STOP) {
   break;
 }
-xfer += iprot->skip(ftype);
+switch (fid)
+{
+  case 1:
+if (ftype == ::apache::thrift::protocol::T_I64) {
+  xfer += iprot->readI64(this->eventId);
+  this->__isset.eventId = true;
+} else {
+  xfer += iprot->skip(ftype);
+}
+break;
+  default:
+xfer += iprot->skip(ftype);
+break;
+}
 xfer += iprot->readFieldEnd();
   }
 
@@ -22789,6 +22806,10 @@ uint32_t 
FireEventResponse::write(::apache::thrift::protocol::TProtocol* oprot)
   apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
   xfer += 

[hive] branch branch-3 updated (5ed2ec0 -> 64ecee6)

2020-03-31 Thread vihangk1
This is an automated email from the ASF dual-hosted git repository.

vihangk1 pushed a change to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hive.git.


from 5ed2ec0  HIVE-23033:MSSQL metastore schema init script doesn't 
initialize NOTIFICATION_SEQUENCE (David Lavati via Naveen Gangam)
 new 7426703  HIVE-21851: FireEventResponse should include event id when 
available (Vihang Karajgaonkar, reviewed by Naveen Gangam)
 new 64ecee6  HIVE-23018: Provide a bulk API to fire multiple insert events 
(Vihang Karajgaonkar, reviewed by Yonghzi Chen)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../listener/TestDbNotificationListener.java   |  119 +-
 .../src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp | 2218 +-
 .../gen/thrift/gen-cpp/hive_metastore_types.cpp| 2164 +
 .../src/gen/thrift/gen-cpp/hive_metastore_types.h  |   31 +-
 .../metastore/api/ClearFileMetadataRequest.java|   32 +-
 .../hive/metastore/api/ClientCapabilities.java |   32 +-
 .../hive/metastore/api/FindSchemasByColsResp.java  |   36 +-
 .../hive/metastore/api/FireEventRequest.java   |   32 +-
 .../hive/metastore/api/FireEventRequestData.java   |   98 +-
 .../hive/metastore/api/FireEventResponse.java  |  163 +-
 .../metastore/api/GetAllFunctionsResponse.java |   36 +-
 .../api/GetFileMetadataByExprRequest.java  |   32 +-
 .../metastore/api/GetFileMetadataByExprResult.java |   48 +-
 .../hive/metastore/api/GetFileMetadataRequest.java |   32 +-
 .../hive/metastore/api/GetFileMetadataResult.java  |   44 +-
 .../hive/metastore/api/GetTablesRequest.java   |   32 +-
 .../hadoop/hive/metastore/api/GetTablesResult.java |   36 +-
 .../hive/metastore/api/InsertEventRequestData.java |  223 +-
 .../hive/metastore/api/PutFileMetadataRequest.java |   64 +-
 .../hadoop/hive/metastore/api/SchemaVersion.java   |   36 +-
 .../hive/metastore/api/ThriftHiveMetastore.java| 2432 ++--
 .../hive/metastore/api/WMFullResourcePlan.java |  144 +-
 .../api/WMGetAllResourcePlanResponse.java  |   36 +-
 .../api/WMGetTriggersForResourePlanResponse.java   |   36 +-
 .../api/WMValidateResourcePlanResponse.java|   64 +-
 .../metastore/api/WriteNotificationLogRequest.java |   32 +-
 .../gen-php/metastore/ThriftHiveMetastore.php  | 1368 +--
 .../src/gen/thrift/gen-php/metastore/Types.php |  617 +++--
 .../gen-py/hive_metastore/ThriftHiveMetastore.py   |  924 
 .../src/gen/thrift/gen-py/hive_metastore/ttypes.py |  392 ++--
 .../src/gen/thrift/gen-rb/hive_metastore_types.rb  |   15 +-
 .../hadoop/hive/metastore/HiveMetaStore.java   |   72 +-
 .../src/main/thrift/hive_metastore.thrift  |7 +-
 33 files changed, 6283 insertions(+), 5364 deletions(-)