Skip to content

Commit 463daab

Browse files
wangyumdongjoon-hyun
authored andcommitted
[SPARK-34512][BUILD][SQL] Upgrade built-in Hive to 2.3.9
### What changes were proposed in this pull request? This pr upgrades built-in Hive to 2.3.9. Hive 2.3.9 changes: - [HIVE-17155] - findConfFile() in HiveConf.java has some issues with the conf path - [HIVE-24797] - Disable validate default values when parsing Avro schemas - [HIVE-24608] - Switch back to get_table in HMS client for Hive 2.3.x - [HIVE-21200] - Vectorization: date column throwing java.lang.UnsupportedOperationException for parquet - [HIVE-21563] - Improve Table#getEmptyTable performance by disabling registerAllFunctionsOnce - [HIVE-19228] - Remove commons-httpclient 3.x usage ### Why are the changes needed? Fix regression caused by AVRO-2035. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Unit test. Closes #32750 from wangyum/SPARK-34512. Authored-by: Yuming Wang <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 912d60b commit 463daab

File tree

11 files changed

+70
-39
lines changed

11 files changed

+70
-39
lines changed

dev/deps/spark-deps-hadoop-2.7-hive-2.3

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,21 @@ hadoop-yarn-client/2.7.4//hadoop-yarn-client-2.7.4.jar
8383
hadoop-yarn-common/2.7.4//hadoop-yarn-common-2.7.4.jar
8484
hadoop-yarn-server-common/2.7.4//hadoop-yarn-server-common-2.7.4.jar
8585
hadoop-yarn-server-web-proxy/2.7.4//hadoop-yarn-server-web-proxy-2.7.4.jar
86-
hive-beeline/2.3.8//hive-beeline-2.3.8.jar
87-
hive-cli/2.3.8//hive-cli-2.3.8.jar
88-
hive-common/2.3.8//hive-common-2.3.8.jar
89-
hive-exec/2.3.8/core/hive-exec-2.3.8-core.jar
90-
hive-jdbc/2.3.8//hive-jdbc-2.3.8.jar
91-
hive-llap-common/2.3.8//hive-llap-common-2.3.8.jar
92-
hive-metastore/2.3.8//hive-metastore-2.3.8.jar
93-
hive-serde/2.3.8//hive-serde-2.3.8.jar
86+
hive-beeline/2.3.9//hive-beeline-2.3.9.jar
87+
hive-cli/2.3.9//hive-cli-2.3.9.jar
88+
hive-common/2.3.9//hive-common-2.3.9.jar
89+
hive-exec/2.3.9/core/hive-exec-2.3.9-core.jar
90+
hive-jdbc/2.3.9//hive-jdbc-2.3.9.jar
91+
hive-llap-common/2.3.9//hive-llap-common-2.3.9.jar
92+
hive-metastore/2.3.9//hive-metastore-2.3.9.jar
93+
hive-serde/2.3.9//hive-serde-2.3.9.jar
9494
hive-service-rpc/3.1.2//hive-service-rpc-3.1.2.jar
95-
hive-shims-0.23/2.3.8//hive-shims-0.23-2.3.8.jar
96-
hive-shims-common/2.3.8//hive-shims-common-2.3.8.jar
97-
hive-shims-scheduler/2.3.8//hive-shims-scheduler-2.3.8.jar
98-
hive-shims/2.3.8//hive-shims-2.3.8.jar
95+
hive-shims-0.23/2.3.9//hive-shims-0.23-2.3.9.jar
96+
hive-shims-common/2.3.9//hive-shims-common-2.3.9.jar
97+
hive-shims-scheduler/2.3.9//hive-shims-scheduler-2.3.9.jar
98+
hive-shims/2.3.9//hive-shims-2.3.9.jar
9999
hive-storage-api/2.7.2//hive-storage-api-2.7.2.jar
100-
hive-vector-code-gen/2.3.8//hive-vector-code-gen-2.3.8.jar
100+
hive-vector-code-gen/2.3.9//hive-vector-code-gen-2.3.9.jar
101101
hk2-api/2.6.1//hk2-api-2.6.1.jar
102102
hk2-locator/2.6.1//hk2-locator-2.6.1.jar
103103
hk2-utils/2.6.1//hk2-utils-2.6.1.jar

dev/deps/spark-deps-hadoop-3.2-hive-2.3

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,21 @@ guava/14.0.1//guava-14.0.1.jar
6161
hadoop-client-api/3.2.2//hadoop-client-api-3.2.2.jar
6262
hadoop-client-runtime/3.2.2//hadoop-client-runtime-3.2.2.jar
6363
hadoop-yarn-server-web-proxy/3.2.2//hadoop-yarn-server-web-proxy-3.2.2.jar
64-
hive-beeline/2.3.8//hive-beeline-2.3.8.jar
65-
hive-cli/2.3.8//hive-cli-2.3.8.jar
66-
hive-common/2.3.8//hive-common-2.3.8.jar
67-
hive-exec/2.3.8/core/hive-exec-2.3.8-core.jar
68-
hive-jdbc/2.3.8//hive-jdbc-2.3.8.jar
69-
hive-llap-common/2.3.8//hive-llap-common-2.3.8.jar
70-
hive-metastore/2.3.8//hive-metastore-2.3.8.jar
71-
hive-serde/2.3.8//hive-serde-2.3.8.jar
64+
hive-beeline/2.3.9//hive-beeline-2.3.9.jar
65+
hive-cli/2.3.9//hive-cli-2.3.9.jar
66+
hive-common/2.3.9//hive-common-2.3.9.jar
67+
hive-exec/2.3.9/core/hive-exec-2.3.9-core.jar
68+
hive-jdbc/2.3.9//hive-jdbc-2.3.9.jar
69+
hive-llap-common/2.3.9//hive-llap-common-2.3.9.jar
70+
hive-metastore/2.3.9//hive-metastore-2.3.9.jar
71+
hive-serde/2.3.9//hive-serde-2.3.9.jar
7272
hive-service-rpc/3.1.2//hive-service-rpc-3.1.2.jar
73-
hive-shims-0.23/2.3.8//hive-shims-0.23-2.3.8.jar
74-
hive-shims-common/2.3.8//hive-shims-common-2.3.8.jar
75-
hive-shims-scheduler/2.3.8//hive-shims-scheduler-2.3.8.jar
76-
hive-shims/2.3.8//hive-shims-2.3.8.jar
73+
hive-shims-0.23/2.3.9//hive-shims-0.23-2.3.9.jar
74+
hive-shims-common/2.3.9//hive-shims-common-2.3.9.jar
75+
hive-shims-scheduler/2.3.9//hive-shims-scheduler-2.3.9.jar
76+
hive-shims/2.3.9//hive-shims-2.3.9.jar
7777
hive-storage-api/2.7.2//hive-storage-api-2.7.2.jar
78-
hive-vector-code-gen/2.3.8//hive-vector-code-gen-2.3.8.jar
78+
hive-vector-code-gen/2.3.9//hive-vector-code-gen-2.3.9.jar
7979
hk2-api/2.6.1//hk2-api-2.6.1.jar
8080
hk2-locator/2.6.1//hk2-locator-2.6.1.jar
8181
hk2-utils/2.6.1//hk2-utils-2.6.1.jar

docs/building-spark.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ Example:
8383

8484
To enable Hive integration for Spark SQL along with its JDBC server and CLI,
8585
add the `-Phive` and `-Phive-thriftserver` profiles to your existing build options.
86-
By default Spark will build with Hive 2.3.8.
86+
By default Spark will build with Hive 2.3.9.
8787

88-
# With Hive 2.3.8 support
88+
# With Hive 2.3.9 support
8989
./build/mvn -Pyarn -Phive -Phive-thriftserver -DskipTests clean package
9090

9191
## Packaging without Hadoop Dependencies for YARN

docs/sql-data-sources-hive-tables.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ The following options can be used to configure the version of Hive that is used
127127
<tr><th>Property Name</th><th>Default</th><th>Meaning</th><th>Since Version</th></tr>
128128
<tr>
129129
<td><code>spark.sql.hive.metastore.version</code></td>
130-
<td><code>2.3.8</code></td>
130+
<td><code>2.3.9</code></td>
131131
<td>
132132
Version of the Hive metastore. Available
133-
options are <code>0.12.0</code> through <code>2.3.8</code> and <code>3.0.0</code> through <code>3.1.2</code>.
133+
options are <code>0.12.0</code> through <code>2.3.9</code> and <code>3.0.0</code> through <code>3.1.2</code>.
134134
</td>
135135
<td>1.4.0</td>
136136
</tr>
@@ -142,9 +142,9 @@ The following options can be used to configure the version of Hive that is used
142142
property can be one of four options:
143143
<ol>
144144
<li><code>builtin</code></li>
145-
Use Hive 2.3.8, which is bundled with the Spark assembly when <code>-Phive</code> is
145+
Use Hive 2.3.9, which is bundled with the Spark assembly when <code>-Phive</code> is
146146
enabled. When this option is chosen, <code>spark.sql.hive.metastore.version</code> must be
147-
either <code>2.3.8</code> or not defined.
147+
either <code>2.3.9</code> or not defined.
148148
<li><code>maven</code></li>
149149
Use Hive jars of specified version downloaded from Maven repositories. This configuration
150150
is not generally recommended for production deployments.

docs/sql-migration-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ Python UDF registration is unchanged.
925925
Spark SQL is designed to be compatible with the Hive Metastore, SerDes and UDFs.
926926
Currently, Hive SerDes and UDFs are based on built-in Hive,
927927
and Spark SQL can be connected to different versions of Hive Metastore
928-
(from 0.12.0 to 2.3.8 and 3.0.0 to 3.1.2. Also see [Interacting with Different Versions of Hive Metastore](sql-data-sources-hive-tables.html#interacting-with-different-versions-of-hive-metastore)).
928+
(from 0.12.0 to 2.3.9 and 3.0.0 to 3.1.2. Also see [Interacting with Different Versions of Hive Metastore](sql-data-sources-hive-tables.html#interacting-with-different-versions-of-hive-metastore)).
929929

930930
#### Deploying in Existing Hive Warehouses
931931
{:.no_toc}

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@
128128
<hive.group>org.apache.hive</hive.group>
129129
<hive.classifier>core</hive.classifier>
130130
<!-- Version used in Maven Hive dependency -->
131-
<hive.version>2.3.8</hive.version>
132-
<hive23.version>2.3.8</hive23.version>
131+
<hive.version>2.3.9</hive.version>
132+
<hive23.version>2.3.9</hive23.version>
133133
<!-- Version used for internal directory structure -->
134134
<hive.version.short>2.3</hive.version.short>
135135
<!-- note that this should be compatible with Kafka brokers version 0.10 and up -->

sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3642,7 +3642,7 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
36423642

36433643
test("SPARK-33084: Add jar support Ivy URI in SQL") {
36443644
val sc = spark.sparkContext
3645-
val hiveVersion = "2.3.8"
3645+
val hiveVersion = "2.3.9"
36463646
// transitive=false, only download specified jar
36473647
sql(s"ADD JAR ivy://org.apache.hive.hcatalog:hive-hcatalog-core:$hiveVersion?transitive=false")
36483648
assert(sc.listJars()

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ private[spark] object HiveUtils extends Logging {
7171

7272
val HIVE_METASTORE_VERSION = buildStaticConf("spark.sql.hive.metastore.version")
7373
.doc("Version of the Hive metastore. Available options are " +
74-
"<code>0.12.0</code> through <code>2.3.8</code> and " +
74+
"<code>0.12.0</code> through <code>2.3.9</code> and " +
7575
"<code>3.0.0</code> through <code>3.1.2</code>.")
7676
.version("1.4.0")
7777
.stringConf

sql/hive/src/main/scala/org/apache/spark/sql/hive/client/package.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ package object client {
102102

103103
// Since HIVE-23980, calcite-core included in Hive package jar.
104104
// For spark, only VersionsSuite currently creates a hive materialized view for testing.
105-
case object v2_3 extends HiveVersion("2.3.8",
105+
case object v2_3 extends HiveVersion("2.3.9",
106106
exclusions = Seq("org.apache.calcite:calcite-core",
107107
"org.apache.calcite:calcite-druid",
108108
"org.apache.calcite.avatica:avatica",

sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveExternalCatalogVersionsSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ class HiveExternalCatalogVersionsSuite extends SparkSubmitTestUtils {
203203
tryDownloadSpark(version, sparkTestingDir.getCanonicalPath)
204204
}
205205

206-
// Extract major.minor for testing Spark 3.1.x and 3.0.x with metastore 2.3.8 and Java 11.
206+
// Extract major.minor for testing Spark 3.1.x and 3.0.x with metastore 2.3.9 and Java 11.
207207
val hiveMetastoreVersion = """^\d+\.\d+""".r.findFirstIn(hiveVersion).get
208208
val args = Seq(
209209
"--name", "prepare testing tables",

0 commit comments

Comments
 (0)