[hive] branch master updated: HIVE-26321: Upgrade commons-io to 2.11.0 (Naveen Gangam) (#3370)
This is an automated email from the ASF dual-hosted git repository. ngangam 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 0033675057a HIVE-26321: Upgrade commons-io to 2.11.0 (Naveen Gangam) (#3370) 0033675057a is described below commit 0033675057a60d0a05a252854455e2b8835e89cc Author: Naveen Gangam AuthorDate: Wed Jun 15 16:28:02 2022 -0400 HIVE-26321: Upgrade commons-io to 2.11.0 (Naveen Gangam) (#3370) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1c25c659b2a..75fca731663 100644 --- a/pom.xml +++ b/pom.xml @@ -116,7 +116,7 @@ 1.21 1.10 1.1 -2.8.0 +2.11.0 3.9 3.6.1 2.7.0
[hive] branch master updated: HIVE-26269 Class cast exception when vectorization is enabled for certain case when cases (#3329)
This is an automated email from the ASF dual-hosted git repository. rameshkumar 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 fdea1bd1ba3 HIVE-26269 Class cast exception when vectorization is enabled for certain case when cases (#3329) fdea1bd1ba3 is described below commit fdea1bd1ba3c4b2b27ef2bf0a463ca91d4d44653 Author: Ramesh Kumar AuthorDate: Wed Jun 15 10:31:44 2022 -0700 HIVE-26269 Class cast exception when vectorization is enabled for certain case when cases (#3329) --- .../hive/ql/exec/vector/VectorizationContext.java | 19 +- .../queries/clientpositive/vector_case_when_3.q| 9 + .../clientpositive/llap/vector_case_when_3.q.out | 288 + 3 files changed, 312 insertions(+), 4 deletions(-) diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java index 6a897939819..6d0e4899e68 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java @@ -2407,7 +2407,7 @@ import com.google.common.annotations.VisibleForTesting; } else if (udf instanceof GenericUDFToString) { ve = getCastToString(childExpr, returnType); } else if (udf instanceof GenericUDFToDecimal) { - ve = getCastToDecimal(childExpr, returnType); + ve = getCastToDecimal(childExpr, mode, returnType); } else if (udf instanceof GenericUDFToChar) { ve = getCastToChar(childExpr, returnType); } else if (udf instanceof GenericUDFToVarchar) { @@ -3232,8 +3232,8 @@ import com.google.common.annotations.VisibleForTesting; return null; } - private VectorExpression getCastToDecimal(List childExpr, TypeInfo returnType) - throws HiveException { + private VectorExpression getCastToDecimal(List childExpr, VectorExpressionDescriptor.Mode mode, + TypeInfo returnType) throws HiveException { ExprNodeDesc child = childExpr.get(0); String inputType = childExpr.get(0).getTypeString(); if (child instanceof ExprNodeConstantDesc) { @@ -3278,7 +3278,18 @@ import com.google.common.annotations.VisibleForTesting; int colIndex = getInputColumnIndex((ExprNodeColumnDesc) child); DataTypePhysicalVariation dataTypePhysicalVariation = getDataTypePhysicalVariation(colIndex); if (dataTypePhysicalVariation == DataTypePhysicalVariation.DECIMAL_64) { - + // try to scale up the expression so we can match the return type scale + if (tryDecimal64Cast && ((DecimalTypeInfo)returnType).precision() <= 18) { +List children = new ArrayList<>(); +int scaleDiff = ((DecimalTypeInfo)returnType).scale() - ((DecimalTypeInfo)childExpr.get(0).getTypeInfo()).scale(); +ExprNodeDesc newConstant = new ExprNodeConstantDesc(new DecimalTypeInfo(scaleDiff, 0), +HiveDecimal.create(POWEROFTENTABLE[scaleDiff])); +children.add(child); +children.add(newConstant); +ExprNodeGenericFuncDesc newScaledExpr = new ExprNodeGenericFuncDesc(returnType, +new GenericUDFOPScaleUpDecimal64(), " ScaleUp ", children); +return getVectorExpression(newScaledExpr, mode); + } // Do Decimal64 conversion instead. return createDecimal64ToDecimalConversion(colIndex, returnType); } else { diff --git a/ql/src/test/queries/clientpositive/vector_case_when_3.q b/ql/src/test/queries/clientpositive/vector_case_when_3.q new file mode 100644 index 000..35a157a9941 --- /dev/null +++ b/ql/src/test/queries/clientpositive/vector_case_when_3.q @@ -0,0 +1,9 @@ +set hive.explain.user=false; +set hive.fetch.task.conversion=none; +set hive.vectorized.execution.enabled=true; +create external table test_decimal(rattag string, newclt_all decimal(15,2)) stored as orc; +insert into test_decimal values('a', '10.20'); +explain vectorization detail select sum(case when rattag='a' then newclt_all*0.3 else newclt_all end) from test_decimal; +select sum(case when rattag='a' then newclt_all*0.3 else newclt_all end) from test_decimal; +explain vectorization detail select sum(case when rattag='Y' then newclt_all*0.3 else newclt_all end) from test_decimal; +select sum(case when rattag='Y' then newclt_all*0.3 else newclt_all end) from test_decimal; diff --git a/ql/src/test/results/clientpositive/llap/vector_case_when_3.q.out b/ql/src/test/results/clientpositive/llap/vector_case_when_3.q.out new file mode 100644 index 000..ddfe1d85aa9 --- /dev/null +++ b/ql/src/test/results/clientpositive/llap/vector_case_when_3.q.out @@ -0,0 +1,288 @@ +PREHOOK: query: create external table test_decimal(rattag string, newclt_all decimal(15,2)) stored as orc +PREHOOK: type: CREATETABLE +PREHOOK:
[hive] branch master updated: HIVE-26309: Remove Log4jConfig junit extension in favor of LoggerContextSource (Stamatis Zampetakis, reviewed by Alessandro Solimando, Laszlo Bodor)
This is an automated email from the ASF dual-hosted git repository. zabetak 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 da96760e83d HIVE-26309: Remove Log4jConfig junit extension in favor of LoggerContextSource (Stamatis Zampetakis, reviewed by Alessandro Solimando, Laszlo Bodor) da96760e83d is described below commit da96760e83d8a87e1dc5f9d30f7a2ea29307db9d Author: Stamatis Zampetakis AuthorDate: Thu Jun 9 17:19:32 2022 +0200 HIVE-26309: Remove Log4jConfig junit extension in favor of LoggerContextSource (Stamatis Zampetakis, reviewed by Alessandro Solimando, Laszlo Bodor) Closes #3356 --- llap-server/pom.xml| 7 ++ .../llap/daemon/impl/TestLlapDaemonLogging.java| 7 +- testutils/pom.xml | 5 -- .../testutils/junit/extensions/Log4jConfig.java| 37 -- .../junit/extensions/Log4jConfigExtension.java | 83 -- .../junit/extensions/TestLog4jConfigExtension.java | 65 - .../src/test/resources/test0-log4j2.properties | 32 - .../src/test/resources/test1-log4j2.properties | 32 - 8 files changed, 10 insertions(+), 258 deletions(-) diff --git a/llap-server/pom.xml b/llap-server/pom.xml index 7d1f93cb46b..42251033679 100644 --- a/llap-server/pom.xml +++ b/llap-server/pom.xml @@ -334,6 +334,13 @@ + + org.apache.logging.log4j + log4j-core + ${log4j2.version} + tests + test + junit junit diff --git a/llap-server/src/test/org/apache/hadoop/hive/llap/daemon/impl/TestLlapDaemonLogging.java b/llap-server/src/test/org/apache/hadoop/hive/llap/daemon/impl/TestLlapDaemonLogging.java index 467961a2c43..9b03f0fb162 100644 --- a/llap-server/src/test/org/apache/hadoop/hive/llap/daemon/impl/TestLlapDaemonLogging.java +++ b/llap-server/src/test/org/apache/hadoop/hive/llap/daemon/impl/TestLlapDaemonLogging.java @@ -25,8 +25,9 @@ import org.apache.hadoop.security.Credentials; import org.apache.hadoop.security.token.Token; import org.apache.hive.testutils.junit.extensions.DoNothingTCPServer; import org.apache.hive.testutils.junit.extensions.DoNothingTCPServerExtension; -import org.apache.hive.testutils.junit.extensions.Log4jConfig; +import org.apache.logging.log4j.junit.LoggerContextSource; import org.apache.tez.common.security.TokenCache; + import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -44,10 +45,10 @@ import static org.junit.jupiter.api.Assertions.assertTrue; /** * Tests for the log4j configuration of the LLAP daemons. */ +@LoggerContextSource("llap-daemon-routing-log4j2.properties") public class TestLlapDaemonLogging { @Test - @Log4jConfig("llap-daemon-routing-log4j2.properties") @ExtendWith(LlapDaemonExtension.class) @ExtendWith(DoNothingTCPServerExtension.class) void testQueryRoutingNoLeakFileDescriptors(LlapDaemon daemon, DoNothingTCPServer amMockServer) @@ -74,7 +75,6 @@ public class TestLlapDaemonLogging { } @Test - @Log4jConfig("llap-daemon-routing-log4j2.properties") @ExtendWith(LlapDaemonExtension.class) @ExtendWith(DoNothingTCPServerExtension.class) void testQueryRoutingLogFileNameOnIncompleteQuery(LlapDaemon daemon, DoNothingTCPServer amMockServer) @@ -97,7 +97,6 @@ public class TestLlapDaemonLogging { } @Test - @Log4jConfig("llap-daemon-routing-log4j2.properties") @ExtendWith(LlapDaemonExtension.class) @ExtendWith(DoNothingTCPServerExtension.class) void testQueryRoutingLogFileNameOnCompleteQuery(LlapDaemon daemon, DoNothingTCPServer amMockServer) diff --git a/testutils/pom.xml b/testutils/pom.xml index d2d4fe27061..431c4e32601 100644 --- a/testutils/pom.xml +++ b/testutils/pom.xml @@ -37,11 +37,6 @@ junit junit - - org.apache.logging.log4j - log4j-core - ${log4j2.version} - org.junit.jupiter junit-jupiter-api diff --git a/testutils/src/java/org/apache/hive/testutils/junit/extensions/Log4jConfig.java b/testutils/src/java/org/apache/hive/testutils/junit/extensions/Log4jConfig.java deleted file mode 100644 index dd96941ff42..000 --- a/testutils/src/java/org/apache/hive/testutils/junit/extensions/Log4jConfig.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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
[hive] branch master updated: HIVE-25733: Add check-spelling/check-spelling (#2809) (Josh Soref reviewed by Zoltan Haindrich) (Addendum)
This is an automated email from the ASF dual-hosted git repository. pvary 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 0b4e466866f HIVE-25733: Add check-spelling/check-spelling (#2809) (Josh Soref reviewed by Zoltan Haindrich) (Addendum) 0b4e466866f is described below commit 0b4e466866fe07a160b0e4b0c27d2b3fb7613c45 Author: Peter Vary AuthorDate: Wed Jun 15 10:48:01 2022 +0200 HIVE-25733: Add check-spelling/check-spelling (#2809) (Josh Soref reviewed by Zoltan Haindrich) (Addendum) --- .github/actions/spelling/expect.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 39b9d7fc583..98ab7679399 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -21,6 +21,7 @@ ANull anullint anullstring aoig +api arecord args arraycopy @@ -124,6 +125,7 @@ eoi EQVR Escapables ESCAPECHAR +esri ETX etype facebook @@ -434,6 +436,7 @@ vlong voi vtype wiki +wkid workaround writables www