diff --git itests/src/test/resources/testconfiguration.properties itests/src/test/resources/testconfiguration.properties index 441b278..4af4c58 100644 --- itests/src/test/resources/testconfiguration.properties +++ itests/src/test/resources/testconfiguration.properties @@ -185,6 +185,7 @@ minitez.query.files.shared=alter_merge_2_orc.q,\ update_where_non_partitioned.q,\ update_where_partitioned.q,\ update_two_cols.q,\ + vector_acid3.q,\ vector_aggregate_9.q,\ vector_between_in.q,\ vector_binary_join_groupby.q,\ diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java index b02374e..074ad64 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java @@ -6689,10 +6689,6 @@ private void checkAcidConstraints(QB qb, TableDesc tableDesc, LOG.debug("Couldn't find table " + tableName + " in insertIntoTable"); throw new SemanticException(ErrorMsg.NO_INSERT_OVERWRITE_WITH_ACID.getMsg()); } - if (conf.getBoolVar(ConfVars.HIVE_VECTORIZATION_ENABLED)) { - LOG.info("Turning off vectorization for acid write operation"); - conf.setBoolVar(ConfVars.HIVE_VECTORIZATION_ENABLED, false); - } LOG.info("Modifying config values for ACID write"); conf.setBoolVar(ConfVars.HIVEOPTREDUCEDEDUPLICATION, true); conf.setIntVar(ConfVars.HIVEOPTREDUCEDEDUPLICATIONMINREDUCER, 1); diff --git ql/src/test/queries/clientpositive/vector_acid3.q ql/src/test/queries/clientpositive/vector_acid3.q new file mode 100644 index 0000000..d4313f4 --- /dev/null +++ ql/src/test/queries/clientpositive/vector_acid3.q @@ -0,0 +1,17 @@ +set hive.support.concurrency=true; +set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; +set hive.exec.dynamic.partition.mode=nonstrict; +set hive.exec.dynamic.partition=true; +set hive.vectorized.execution.enabled=true; + +drop table if exists testacid1; + +create table testacid1(id int) clustered by (id) into 2 buckets stored as orc tblproperties("transactional"="true"); + +insert into table testacid1 values (1),(2),(3),(4); + +set hive.compute.query.using.stats=false; + +set hive.vectorized.execution.enabled; + +select count(1) from testacid1; diff --git ql/src/test/results/clientpositive/tez/vector_acid3.q.out ql/src/test/results/clientpositive/tez/vector_acid3.q.out new file mode 100644 index 0000000..4299c73 --- /dev/null +++ ql/src/test/results/clientpositive/tez/vector_acid3.q.out @@ -0,0 +1,31 @@ +PREHOOK: query: drop table if exists testacid1 +PREHOOK: type: DROPTABLE +POSTHOOK: query: drop table if exists testacid1 +POSTHOOK: type: DROPTABLE +PREHOOK: query: create table testacid1(id int) clustered by (id) into 2 buckets stored as orc tblproperties("transactional"="true") +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@testacid1 +POSTHOOK: query: create table testacid1(id int) clustered by (id) into 2 buckets stored as orc tblproperties("transactional"="true") +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@testacid1 +PREHOOK: query: insert into table testacid1 values (1),(2),(3),(4) +PREHOOK: type: QUERY +PREHOOK: Input: default@values__tmp__table__1 +PREHOOK: Output: default@testacid1 +POSTHOOK: query: insert into table testacid1 values (1),(2),(3),(4) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@values__tmp__table__1 +POSTHOOK: Output: default@testacid1 +POSTHOOK: Lineage: testacid1.id EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col1, type:string, comment:), ] +hive.vectorized.execution.enabled=true +PREHOOK: query: select count(1) from testacid1 +PREHOOK: type: QUERY +PREHOOK: Input: default@testacid1 +#### A masked pattern was here #### +POSTHOOK: query: select count(1) from testacid1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@testacid1 +#### A masked pattern was here #### +4 diff --git ql/src/test/results/clientpositive/vector_acid3.q.out ql/src/test/results/clientpositive/vector_acid3.q.out new file mode 100644 index 0000000..4299c73 --- /dev/null +++ ql/src/test/results/clientpositive/vector_acid3.q.out @@ -0,0 +1,31 @@ +PREHOOK: query: drop table if exists testacid1 +PREHOOK: type: DROPTABLE +POSTHOOK: query: drop table if exists testacid1 +POSTHOOK: type: DROPTABLE +PREHOOK: query: create table testacid1(id int) clustered by (id) into 2 buckets stored as orc tblproperties("transactional"="true") +PREHOOK: type: CREATETABLE +PREHOOK: Output: database:default +PREHOOK: Output: default@testacid1 +POSTHOOK: query: create table testacid1(id int) clustered by (id) into 2 buckets stored as orc tblproperties("transactional"="true") +POSTHOOK: type: CREATETABLE +POSTHOOK: Output: database:default +POSTHOOK: Output: default@testacid1 +PREHOOK: query: insert into table testacid1 values (1),(2),(3),(4) +PREHOOK: type: QUERY +PREHOOK: Input: default@values__tmp__table__1 +PREHOOK: Output: default@testacid1 +POSTHOOK: query: insert into table testacid1 values (1),(2),(3),(4) +POSTHOOK: type: QUERY +POSTHOOK: Input: default@values__tmp__table__1 +POSTHOOK: Output: default@testacid1 +POSTHOOK: Lineage: testacid1.id EXPRESSION [(values__tmp__table__1)values__tmp__table__1.FieldSchema(name:tmp_values_col1, type:string, comment:), ] +hive.vectorized.execution.enabled=true +PREHOOK: query: select count(1) from testacid1 +PREHOOK: type: QUERY +PREHOOK: Input: default@testacid1 +#### A masked pattern was here #### +POSTHOOK: query: select count(1) from testacid1 +POSTHOOK: type: QUERY +POSTHOOK: Input: default@testacid1 +#### A masked pattern was here #### +4