[hive] branch master updated: HIVE-21582: Prefix msck configs with metastore (Prasanth Jayachandran reviewed by Jason Dere)

2019-04-15 Thread prasanthj
This is an automated email from the ASF dual-hosted git repository.

prasanthj 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 cc8ba3a  HIVE-21582: Prefix msck configs with metastore (Prasanth 
Jayachandran reviewed by Jason Dere)
cc8ba3a is described below

commit cc8ba3aff76adfbc93770dc007461f59ec62b5d8
Author: Prasanth Jayachandran 
AuthorDate: Mon Apr 15 11:46:36 2019 -0700

HIVE-21582: Prefix msck configs with metastore (Prasanth Jayachandran 
reviewed by Jason Dere)
---
 ql/src/test/queries/clientpositive/partition_discovery.q   |  6 +++---
 .../org/apache/hadoop/hive/metastore/conf/MetastoreConf.java   | 10 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/ql/src/test/queries/clientpositive/partition_discovery.q 
b/ql/src/test/queries/clientpositive/partition_discovery.q
index 7af9664..c85b6fd 100644
--- a/ql/src/test/queries/clientpositive/partition_discovery.q
+++ b/ql/src/test/queries/clientpositive/partition_discovery.q
@@ -42,13 +42,13 @@ dfs ${system:test.dfs.mkdir} 
${system:test.warehouse.dir}/repairtable_n9/p1=c/p2
 dfs -touchz ${system:test.warehouse.dir}/repairtable_n9/p1=a/p2=b/datafile;
 dfs -touchz ${system:test.warehouse.dir}/repairtable_n9/p1=c/p2=d/datafile;
 
-set msck.repair.enable.partition.retention=false;
+set metastore.msck.repair.enable.partition.retention=false;
 MSCK REPAIR TABLE default.repairtable_n9;
 show partitions default.repairtable_n9;
 
 !sleep 12;
 
-set msck.repair.enable.partition.retention=true;
+set metastore.msck.repair.enable.partition.retention=true;
 -- msck does not drop partitions, so this still should be no-op
 MSCK REPAIR TABLE default.repairtable_n9;
 show partitions default.repairtable_n9;
@@ -65,7 +65,7 @@ dfs ${system:test.dfs.mkdir} 
${system:test.warehouse.dir}/repairtable_n10/p1=c/p
 dfs -touchz ${system:test.warehouse.dir}/repairtable_n10/p1=a/p2=b/datafile;
 dfs -touchz ${system:test.warehouse.dir}/repairtable_n10/p1=c/p2=d/datafile;
 
-set msck.repair.enable.partition.retention=false;
+set metastore.msck.repair.enable.partition.retention=false;
 !sleep 12;
 MSCK REPAIR TABLE default.repairtable_n10;
 show partitions default.repairtable_n10;
diff --git 
a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
 
b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
index c918e2b..bac9d01 100644
--- 
a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
+++ 
b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
@@ -697,25 +697,25 @@ public class MetastoreConf {
 METRICS_REPORTERS("metastore.metrics.reporters", 
"metastore.metrics.reporters", "json,jmx",
 new StringSetValidator("json", "jmx", "console", "hadoop", "slf4j"),
 "A comma separated list of metrics reporters to start"),
-MSCK_PATH_VALIDATION("msck.path.validation", "hive.msck.path.validation", 
"throw",
+MSCK_PATH_VALIDATION("metastore.msck.path.validation", 
"hive.msck.path.validation", "throw",
   new StringSetValidator("throw", "skip", "ignore"), "The approach msck 
should take with HDFS " +
   "directories that are partition-like but contain unsupported characters. 
'throw' (an " +
   "exception) is the default; 'skip' will skip the invalid directories and 
still repair the" +
   " others; 'ignore' will skip the validation (legacy behavior, causes 
bugs in many cases)"),
-MSCK_REPAIR_BATCH_SIZE("msck.repair.batch.size",
+MSCK_REPAIR_BATCH_SIZE("metastore.msck.repair.batch.size",
   "hive.msck.repair.batch.size", 3000,
   "Batch size for the msck repair command. If the value is greater than 
zero,\n "
 + "it will execute batch wise with the configured batch size. In case 
of errors while\n"
 + "adding unknown partitions the batch size is automatically reduced 
by half in the subsequent\n"
 + "retry attempt. The default value is 3000 which means it will 
execute in the batches of 3000."),
-MSCK_REPAIR_BATCH_MAX_RETRIES("msck.repair.batch.max.retries", 
"hive.msck.repair.batch.max.retries", 4,
+MSCK_REPAIR_BATCH_MAX_RETRIES("metastore.msck.repair.batch.max.retries", 
"hive.msck.repair.batch.max.retries", 4,
   "Maximum number of retries for the msck repair command when adding 
unknown partitions.\n "
 + "If the value is greater than zero it will retry adding unknown 
partitions until the maximum\n"
 + "number of attempts is reached or batch size is reduced to 0, 
whichever is earlier.\n"
 + "In each retry attempt it will reduce the batch size by a factor of 
2 until it reaches zero.\n"
 + "If the value is set to zero it will retry until the batch size 
becomes zero as described 

[hive] 02/02: HIVE-21600: GenTezUtils.removeSemiJoinOperator may throw out of bounds exception for TS with multiple children (Jesus Camacho Rodriguez, reviewed by Vineet Garg)

2019-04-15 Thread jcamacho
This is an automated email from the ASF dual-hosted git repository.

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

commit 90ae60841e39ad5c7222911830c7d438e962a278
Author: Jesus Camacho Rodriguez 
AuthorDate: Wed Apr 10 13:32:29 2019 -0700

HIVE-21600: GenTezUtils.removeSemiJoinOperator may throw out of bounds 
exception for TS with multiple children (Jesus Camacho Rodriguez, reviewed by 
Vineet Garg)
---
 ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java 
b/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java
index 741833b..7188a0d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java
@@ -608,12 +608,12 @@ public class GenTezUtils {
   }
 }
 // Filter operator
-filterDynamicValuePredicatesCollection = new 
DynamicValuePredicateContext();
 for (Operator op : ts.getChildOperators()) {
   if (!(op instanceof FilterOperator)) {
 continue;
   }
   FilterDesc filterDesc = ((FilterOperator) op).getConf();
+  filterDynamicValuePredicatesCollection = new 
DynamicValuePredicateContext();
   collectDynamicValuePredicates(filterDesc.getPredicate(),
   filterDynamicValuePredicatesCollection);
   for (ExprNodeDesc nodeToRemove : filterDynamicValuePredicatesCollection



[hive] 01/02: HIVE-21613: Queries with join condition having timestamp or timestamp with local time zone literal throw SemanticException (Jesus Camacho Rodriguez, reviewed by Sankar Hariappan)

2019-04-15 Thread jcamacho
This is an automated email from the ASF dual-hosted git repository.

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

commit 41b65fd48fd51b3e460de23c23637e6b4d43e95d
Author: Jesus Camacho Rodriguez 
AuthorDate: Fri Apr 12 20:12:04 2019 -0700

HIVE-21613: Queries with join condition having timestamp or timestamp with 
local time zone literal throw SemanticException (Jesus Camacho Rodriguez, 
reviewed by Sankar Hariappan)
---
 .../test/resources/testconfiguration.properties|  2 +
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java |  2 +
 ql/src/test/queries/clientpositive/timestamp_4.q   | 15 ++
 ql/src/test/queries/clientpositive/timestamptz_5.q | 16 ++
 .../results/clientpositive/llap/timestamp_4.q.out  | 58 ++
 .../clientpositive/llap/timestamptz_5.q.out| 57 +
 6 files changed, 150 insertions(+)

diff --git a/itests/src/test/resources/testconfiguration.properties 
b/itests/src/test/resources/testconfiguration.properties
index f09bf14..2504f53 100644
--- a/itests/src/test/resources/testconfiguration.properties
+++ b/itests/src/test/resources/testconfiguration.properties
@@ -758,6 +758,8 @@ minillaplocal.query.files=\
   tez_union_multiinsert.q,\
   tez_vector_dynpart_hashjoin_1.q,\
   tez_vector_dynpart_hashjoin_2.q,\
+  timestamp_4.q,\
+  timestamptz_5.q,\
   uber_reduce.q,\
   udaf_collect_set_2.q,\
   udaf_all_keyword.q,\
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 013cefc..ff9a71b 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -2754,6 +2754,8 @@ public class SemanticAnalyzer extends 
BaseSemanticAnalyzer {
 case HiveParser.KW_TRUE:
 case HiveParser.KW_FALSE:
 case HiveParser.TOK_DATELITERAL:
+case HiveParser.TOK_TIMESTAMPLITERAL:
+case HiveParser.TOK_TIMESTAMPLOCALTZLITERAL:
   break;
 
 case HiveParser.TOK_FUNCTION:
diff --git a/ql/src/test/queries/clientpositive/timestamp_4.q 
b/ql/src/test/queries/clientpositive/timestamp_4.q
new file mode 100644
index 000..b7a6dcc
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/timestamp_4.q
@@ -0,0 +1,15 @@
+drop table if exists timestamp_1;
+drop table if exists timestamp_2;
+
+create table timestamp_1 (key int, dd timestamp);
+create table timestamp_2 (key int, dd timestamp);
+
+-- between clause with timestamp literal in join condition
+select d1.key, d2.dd
+  from (select key, dd as start_dd, current_timestamp as end_dd from 
timestamp_1) d1
+  join timestamp_2 as d2
+on d1.key = d2.key
+where d2.dd between start_dd and end_dd;
+
+drop table timestamp_1;
+drop table timestamp_2;
\ No newline at end of file
diff --git a/ql/src/test/queries/clientpositive/timestamptz_5.q 
b/ql/src/test/queries/clientpositive/timestamptz_5.q
new file mode 100644
index 000..d1e15ee
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/timestamptz_5.q
@@ -0,0 +1,16 @@
+set hive.cbo.enable=false;
+
+drop table if exists timestamplocaltz_n1;
+drop table if exists timestamplocaltz_n2;
+
+create table timestamplocaltz_n1 (key int, dd timestamp with local time zone);
+create table timestamplocaltz_n2 (key int, dd timestamp with local time zone);
+
+-- between clause with timestamp literal in join condition
+select d1.key, d2.dd
+  from (select key, dd as start_dd, current_timestamp as end_dd from 
timestamplocaltz_n1) d1
+  join timestamplocaltz_n2 as d2
+on d1.key = d2.key or d2.dd between timestamplocaltz '2010-04-01 00:00:00 
America/Los_Angeles' and timestamplocaltz '2010-04-02 00:00:00 
America/Los_Angeles';
+
+drop table timestamplocaltz_n1;
+drop table timestamplocaltz_n2;
\ No newline at end of file
diff --git a/ql/src/test/results/clientpositive/llap/timestamp_4.q.out 
b/ql/src/test/results/clientpositive/llap/timestamp_4.q.out
new file mode 100644
index 000..54864de
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/timestamp_4.q.out
@@ -0,0 +1,58 @@
+PREHOOK: query: drop table if exists timestamp_1
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists timestamp_1
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: drop table if exists timestamp_2
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists timestamp_2
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table timestamp_1 (key int, dd timestamp)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@timestamp_1
+POSTHOOK: query: create table timestamp_1 (key int, dd timestamp)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@timestamp_1
+PREHOOK: query: create table timestamp_2 (key int, dd timestamp)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@timestamp_2
+POSTHOOK: query: create table 

[hive] branch branch-3 updated (cda7150 -> 90ae608)

2019-04-15 Thread jcamacho
This is an automated email from the ASF dual-hosted git repository.

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


from cda7150  HIVE-21591: Using triggers in non-LLAP mode should not 
require wm queue (Prasanth Jayachandran reviewed by Daniel Dai)
 new 41b65fd  HIVE-21613: Queries with join condition having timestamp or 
timestamp with local time zone literal throw SemanticException (Jesus Camacho 
Rodriguez, reviewed by Sankar Hariappan)
 new 90ae608  HIVE-21600: GenTezUtils.removeSemiJoinOperator may throw out 
of bounds exception for TS with multiple children (Jesus Camacho Rodriguez, 
reviewed by Vineet Garg)

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:
 .../test/resources/testconfiguration.properties|  2 +
 .../apache/hadoop/hive/ql/parse/GenTezUtils.java   |  2 +-
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java |  2 +
 ql/src/test/queries/clientpositive/timestamp_4.q   | 15 ++
 ql/src/test/queries/clientpositive/timestamptz_5.q | 16 ++
 .../results/clientpositive/llap/timestamp_4.q.out  | 58 ++
 .../clientpositive/llap/timestamptz_5.q.out| 57 +
 7 files changed, 151 insertions(+), 1 deletion(-)
 create mode 100644 ql/src/test/queries/clientpositive/timestamp_4.q
 create mode 100644 ql/src/test/queries/clientpositive/timestamptz_5.q
 create mode 100644 ql/src/test/results/clientpositive/llap/timestamp_4.q.out
 create mode 100644 ql/src/test/results/clientpositive/llap/timestamptz_5.q.out



[hive] 01/02: HIVE-21613: Queries with join condition having timestamp or timestamp with local time zone literal throw SemanticException (Jesus Camacho Rodriguez, reviewed by Sankar Hariappan)

2019-04-15 Thread jcamacho
This is an automated email from the ASF dual-hosted git repository.

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

commit 560016b82d37775c090ef3f80ac92fe36c601b69
Author: Jesus Camacho Rodriguez 
AuthorDate: Fri Apr 12 20:12:04 2019 -0700

HIVE-21613: Queries with join condition having timestamp or timestamp with 
local time zone literal throw SemanticException (Jesus Camacho Rodriguez, 
reviewed by Sankar Hariappan)
---
 .../test/resources/testconfiguration.properties|  2 +
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java |  2 +
 ql/src/test/queries/clientpositive/timestamp_4.q   | 15 ++
 ql/src/test/queries/clientpositive/timestamptz_5.q | 16 ++
 .../results/clientpositive/llap/timestamp_4.q.out  | 58 ++
 .../clientpositive/llap/timestamptz_5.q.out| 57 +
 6 files changed, 150 insertions(+)

diff --git a/itests/src/test/resources/testconfiguration.properties 
b/itests/src/test/resources/testconfiguration.properties
index c217b9b..52cca0c 100644
--- a/itests/src/test/resources/testconfiguration.properties
+++ b/itests/src/test/resources/testconfiguration.properties
@@ -738,6 +738,8 @@ minillaplocal.query.files=\
   tez_union_multiinsert.q,\
   tez_vector_dynpart_hashjoin_1.q,\
   tez_vector_dynpart_hashjoin_2.q,\
+  timestamp_4.q,\
+  timestamptz_5.q,\
   uber_reduce.q,\
   udaf_collect_set_2.q,\
   udaf_all_keyword.q,\
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 9d7d793..f8a4e11 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -2732,6 +2732,8 @@ public class SemanticAnalyzer extends 
BaseSemanticAnalyzer {
 case HiveParser.KW_TRUE:
 case HiveParser.KW_FALSE:
 case HiveParser.TOK_DATELITERAL:
+case HiveParser.TOK_TIMESTAMPLITERAL:
+case HiveParser.TOK_TIMESTAMPLOCALTZLITERAL:
   break;
 
 case HiveParser.TOK_FUNCTION:
diff --git a/ql/src/test/queries/clientpositive/timestamp_4.q 
b/ql/src/test/queries/clientpositive/timestamp_4.q
new file mode 100644
index 000..b7a6dcc
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/timestamp_4.q
@@ -0,0 +1,15 @@
+drop table if exists timestamp_1;
+drop table if exists timestamp_2;
+
+create table timestamp_1 (key int, dd timestamp);
+create table timestamp_2 (key int, dd timestamp);
+
+-- between clause with timestamp literal in join condition
+select d1.key, d2.dd
+  from (select key, dd as start_dd, current_timestamp as end_dd from 
timestamp_1) d1
+  join timestamp_2 as d2
+on d1.key = d2.key
+where d2.dd between start_dd and end_dd;
+
+drop table timestamp_1;
+drop table timestamp_2;
\ No newline at end of file
diff --git a/ql/src/test/queries/clientpositive/timestamptz_5.q 
b/ql/src/test/queries/clientpositive/timestamptz_5.q
new file mode 100644
index 000..d1e15ee
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/timestamptz_5.q
@@ -0,0 +1,16 @@
+set hive.cbo.enable=false;
+
+drop table if exists timestamplocaltz_n1;
+drop table if exists timestamplocaltz_n2;
+
+create table timestamplocaltz_n1 (key int, dd timestamp with local time zone);
+create table timestamplocaltz_n2 (key int, dd timestamp with local time zone);
+
+-- between clause with timestamp literal in join condition
+select d1.key, d2.dd
+  from (select key, dd as start_dd, current_timestamp as end_dd from 
timestamplocaltz_n1) d1
+  join timestamplocaltz_n2 as d2
+on d1.key = d2.key or d2.dd between timestamplocaltz '2010-04-01 00:00:00 
America/Los_Angeles' and timestamplocaltz '2010-04-02 00:00:00 
America/Los_Angeles';
+
+drop table timestamplocaltz_n1;
+drop table timestamplocaltz_n2;
\ No newline at end of file
diff --git a/ql/src/test/results/clientpositive/llap/timestamp_4.q.out 
b/ql/src/test/results/clientpositive/llap/timestamp_4.q.out
new file mode 100644
index 000..54864de
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/timestamp_4.q.out
@@ -0,0 +1,58 @@
+PREHOOK: query: drop table if exists timestamp_1
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists timestamp_1
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: drop table if exists timestamp_2
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists timestamp_2
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table timestamp_1 (key int, dd timestamp)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@timestamp_1
+POSTHOOK: query: create table timestamp_1 (key int, dd timestamp)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@timestamp_1
+PREHOOK: query: create table timestamp_2 (key int, dd timestamp)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@timestamp_2
+POSTHOOK: query: create 

[hive] 02/02: HIVE-21600: GenTezUtils.removeSemiJoinOperator may throw out of bounds exception for TS with multiple children (Jesus Camacho Rodriguez, reviewed by Vineet Garg)

2019-04-15 Thread jcamacho
This is an automated email from the ASF dual-hosted git repository.

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

commit 2b77d693c8bfa0ed596e89af960973a0c984b915
Author: Jesus Camacho Rodriguez 
AuthorDate: Wed Apr 10 13:32:29 2019 -0700

HIVE-21600: GenTezUtils.removeSemiJoinOperator may throw out of bounds 
exception for TS with multiple children (Jesus Camacho Rodriguez, reviewed by 
Vineet Garg)
---
 ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java 
b/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java
index 741833b..7188a0d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java
@@ -608,12 +608,12 @@ public class GenTezUtils {
   }
 }
 // Filter operator
-filterDynamicValuePredicatesCollection = new 
DynamicValuePredicateContext();
 for (Operator op : ts.getChildOperators()) {
   if (!(op instanceof FilterOperator)) {
 continue;
   }
   FilterDesc filterDesc = ((FilterOperator) op).getConf();
+  filterDynamicValuePredicatesCollection = new 
DynamicValuePredicateContext();
   collectDynamicValuePredicates(filterDesc.getPredicate(),
   filterDynamicValuePredicatesCollection);
   for (ExprNodeDesc nodeToRemove : filterDynamicValuePredicatesCollection



[hive] branch branch-3.1 updated (39ca58e -> 2b77d69)

2019-04-15 Thread jcamacho
This is an automated email from the ASF dual-hosted git repository.

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


from 39ca58e  HIVE-18624: Parsing time is extremely high (~10 min) for 
queries with complex select expressions (Zoltan Haindrich reviewed by Ashutosh 
Chauhan)
 new 560016b  HIVE-21613: Queries with join condition having timestamp or 
timestamp with local time zone literal throw SemanticException (Jesus Camacho 
Rodriguez, reviewed by Sankar Hariappan)
 new 2b77d69  HIVE-21600: GenTezUtils.removeSemiJoinOperator may throw out 
of bounds exception for TS with multiple children (Jesus Camacho Rodriguez, 
reviewed by Vineet Garg)

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:
 .../test/resources/testconfiguration.properties|  2 +
 .../apache/hadoop/hive/ql/parse/GenTezUtils.java   |  2 +-
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java |  2 +
 ql/src/test/queries/clientpositive/timestamp_4.q   | 15 ++
 ql/src/test/queries/clientpositive/timestamptz_5.q | 16 ++
 .../results/clientpositive/llap/timestamp_4.q.out  | 58 ++
 .../clientpositive/llap/timestamptz_5.q.out| 57 +
 7 files changed, 151 insertions(+), 1 deletion(-)
 create mode 100644 ql/src/test/queries/clientpositive/timestamp_4.q
 create mode 100644 ql/src/test/queries/clientpositive/timestamptz_5.q
 create mode 100644 ql/src/test/results/clientpositive/llap/timestamp_4.q.out
 create mode 100644 ql/src/test/results/clientpositive/llap/timestamptz_5.q.out



[hive] branch master updated (079a720 -> 9a2f7b0)

2019-04-15 Thread jcamacho
This is an automated email from the ASF dual-hosted git repository.

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


from 079a720  HIVE-21597: WM trigger validation should happen at the time 
of create or alter (Prasanth Jayachandran reviewed by Daniel Dai)
 new d200cb3  HIVE-21613: Queries with join condition having timestamp or 
timestamp with local time zone literal throw SemanticException (Jesus Camacho 
Rodriguez, reviewed by Sankar Hariappan)
 new 9a2f7b0  HIVE-21600: GenTezUtils.removeSemiJoinOperator may throw out 
of bounds exception for TS with multiple children (Jesus Camacho Rodriguez, 
reviewed by Vineet Garg)

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:
 .../test/resources/testconfiguration.properties|  2 +
 .../apache/hadoop/hive/ql/parse/GenTezUtils.java   |  2 +-
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java |  2 +
 ql/src/test/queries/clientpositive/timestamp_4.q   | 15 ++
 ql/src/test/queries/clientpositive/timestamptz_5.q | 16 ++
 .../results/clientpositive/llap/timestamp_4.q.out  | 58 ++
 .../clientpositive/llap/timestamptz_5.q.out| 57 +
 7 files changed, 151 insertions(+), 1 deletion(-)
 create mode 100644 ql/src/test/queries/clientpositive/timestamp_4.q
 create mode 100644 ql/src/test/queries/clientpositive/timestamptz_5.q
 create mode 100644 ql/src/test/results/clientpositive/llap/timestamp_4.q.out
 create mode 100644 ql/src/test/results/clientpositive/llap/timestamptz_5.q.out



[hive] 02/02: HIVE-21600: GenTezUtils.removeSemiJoinOperator may throw out of bounds exception for TS with multiple children (Jesus Camacho Rodriguez, reviewed by Vineet Garg)

2019-04-15 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

commit 9a2f7b0e49a6b93fc127084e856a5ad44e7006f4
Author: Jesus Camacho Rodriguez 
AuthorDate: Wed Apr 10 13:32:29 2019 -0700

HIVE-21600: GenTezUtils.removeSemiJoinOperator may throw out of bounds 
exception for TS with multiple children (Jesus Camacho Rodriguez, reviewed by 
Vineet Garg)
---
 ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java 
b/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java
index 5fdb4bd..d64f983 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/GenTezUtils.java
@@ -631,12 +631,12 @@ public class GenTezUtils {
   }
 }
 // Filter operator
-filterDynamicValuePredicatesCollection = new 
DynamicValuePredicateContext();
 for (Operator op : ts.getChildOperators()) {
   if (!(op instanceof FilterOperator)) {
 continue;
   }
   FilterDesc filterDesc = ((FilterOperator) op).getConf();
+  filterDynamicValuePredicatesCollection = new 
DynamicValuePredicateContext();
   collectDynamicValuePredicates(filterDesc.getPredicate(),
   filterDynamicValuePredicatesCollection);
   for (ExprNodeDesc nodeToRemove : filterDynamicValuePredicatesCollection



[hive] 01/02: HIVE-21613: Queries with join condition having timestamp or timestamp with local time zone literal throw SemanticException (Jesus Camacho Rodriguez, reviewed by Sankar Hariappan)

2019-04-15 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

commit d200cb34b99cc24c5a971f3937ba8b407cffcae9
Author: Jesus Camacho Rodriguez 
AuthorDate: Fri Apr 12 20:12:04 2019 -0700

HIVE-21613: Queries with join condition having timestamp or timestamp with 
local time zone literal throw SemanticException (Jesus Camacho Rodriguez, 
reviewed by Sankar Hariappan)
---
 .../test/resources/testconfiguration.properties|  2 +
 .../hadoop/hive/ql/parse/SemanticAnalyzer.java |  2 +
 ql/src/test/queries/clientpositive/timestamp_4.q   | 15 ++
 ql/src/test/queries/clientpositive/timestamptz_5.q | 16 ++
 .../results/clientpositive/llap/timestamp_4.q.out  | 58 ++
 .../clientpositive/llap/timestamptz_5.q.out| 57 +
 6 files changed, 150 insertions(+)

diff --git a/itests/src/test/resources/testconfiguration.properties 
b/itests/src/test/resources/testconfiguration.properties
index 06b59a7..4a4cca7 100644
--- a/itests/src/test/resources/testconfiguration.properties
+++ b/itests/src/test/resources/testconfiguration.properties
@@ -774,6 +774,8 @@ minillaplocal.query.files=\
   tez_union_multiinsert.q,\
   tez_vector_dynpart_hashjoin_1.q,\
   tez_vector_dynpart_hashjoin_2.q,\
+  timestamp_4.q,\
+  timestamptz_5.q,\
   transitive_not_null.q,\
   truncate_external_force.q,\
   uber_reduce.q,\
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 
b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
index 73ae3ba..f89e8f8 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
@@ -2712,6 +2712,8 @@ public class SemanticAnalyzer extends 
BaseSemanticAnalyzer {
 case HiveParser.KW_TRUE:
 case HiveParser.KW_FALSE:
 case HiveParser.TOK_DATELITERAL:
+case HiveParser.TOK_TIMESTAMPLITERAL:
+case HiveParser.TOK_TIMESTAMPLOCALTZLITERAL:
 case HiveParser.TOK_INTERVAL_DAY_LITERAL:
 case HiveParser.TOK_INTERVAL_DAY_TIME:
 case HiveParser.TOK_INTERVAL_DAY_TIME_LITERAL:
diff --git a/ql/src/test/queries/clientpositive/timestamp_4.q 
b/ql/src/test/queries/clientpositive/timestamp_4.q
new file mode 100644
index 000..b7a6dcc
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/timestamp_4.q
@@ -0,0 +1,15 @@
+drop table if exists timestamp_1;
+drop table if exists timestamp_2;
+
+create table timestamp_1 (key int, dd timestamp);
+create table timestamp_2 (key int, dd timestamp);
+
+-- between clause with timestamp literal in join condition
+select d1.key, d2.dd
+  from (select key, dd as start_dd, current_timestamp as end_dd from 
timestamp_1) d1
+  join timestamp_2 as d2
+on d1.key = d2.key
+where d2.dd between start_dd and end_dd;
+
+drop table timestamp_1;
+drop table timestamp_2;
\ No newline at end of file
diff --git a/ql/src/test/queries/clientpositive/timestamptz_5.q 
b/ql/src/test/queries/clientpositive/timestamptz_5.q
new file mode 100644
index 000..d1e15ee
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/timestamptz_5.q
@@ -0,0 +1,16 @@
+set hive.cbo.enable=false;
+
+drop table if exists timestamplocaltz_n1;
+drop table if exists timestamplocaltz_n2;
+
+create table timestamplocaltz_n1 (key int, dd timestamp with local time zone);
+create table timestamplocaltz_n2 (key int, dd timestamp with local time zone);
+
+-- between clause with timestamp literal in join condition
+select d1.key, d2.dd
+  from (select key, dd as start_dd, current_timestamp as end_dd from 
timestamplocaltz_n1) d1
+  join timestamplocaltz_n2 as d2
+on d1.key = d2.key or d2.dd between timestamplocaltz '2010-04-01 00:00:00 
America/Los_Angeles' and timestamplocaltz '2010-04-02 00:00:00 
America/Los_Angeles';
+
+drop table timestamplocaltz_n1;
+drop table timestamplocaltz_n2;
\ No newline at end of file
diff --git a/ql/src/test/results/clientpositive/llap/timestamp_4.q.out 
b/ql/src/test/results/clientpositive/llap/timestamp_4.q.out
new file mode 100644
index 000..54864de
--- /dev/null
+++ b/ql/src/test/results/clientpositive/llap/timestamp_4.q.out
@@ -0,0 +1,58 @@
+PREHOOK: query: drop table if exists timestamp_1
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists timestamp_1
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: drop table if exists timestamp_2
+PREHOOK: type: DROPTABLE
+POSTHOOK: query: drop table if exists timestamp_2
+POSTHOOK: type: DROPTABLE
+PREHOOK: query: create table timestamp_1 (key int, dd timestamp)
+PREHOOK: type: CREATETABLE
+PREHOOK: Output: database:default
+PREHOOK: Output: default@timestamp_1
+POSTHOOK: query: create table timestamp_1 (key int, dd timestamp)
+POSTHOOK: type: CREATETABLE
+POSTHOOK: Output: database:default
+POSTHOOK: Output: default@timestamp_1
+PREHOOK: query: create table timestamp_2 (key int, dd timestamp)
+PREHOOK: type: CREATETABLE