Skip to content

Commit db67f8c

Browse files
committed
revert
1 parent ecc4318 commit db67f8c

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ private[hive] case class MetastoreRelation(
160160
val tPartition = new org.apache.hadoop.hive.metastore.api.Partition
161161
tPartition.setDbName(databaseName)
162162
tPartition.setTableName(tableName)
163-
tPartition.setValues(partitionKeys.map(a => p.spec(a.name)).asJava)
163+
tPartition.setValues(p.spec.values.toList.asJava)
164164

165165
val sd = new org.apache.hadoop.hive.metastore.api.StorageDescriptor()
166166
tPartition.setSd(sd)

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,24 +1537,6 @@ class SQLQuerySuite extends QueryTest with SQLTestUtils with TestHiveSingleton {
15371537
assert(fs.exists(path), "This is an external table, so the data should not have been dropped")
15381538
}
15391539

1540-
test("select partitioned table") {
1541-
sql(
1542-
s"""
1543-
|CREATE TABLE table_with_partition(c1 string)
1544-
|PARTITIONED BY (p1 string,p2 string,p3 string,p4 string,p5 string)
1545-
""".stripMargin
1546-
)
1547-
sql(
1548-
"""
1549-
|INSERT OVERWRITE TABLE table_with_partition
1550-
|PARTITION (p1='a',p2='b',p3='c',p4='d',p5='e')
1551-
|SELECT 'blarr'
1552-
""". stripMargin)
1553-
checkAnswer(
1554-
sql("SELECT p1, p2, p3, p4, p5, c1 FROM table_with_partition"),
1555-
Row("a", "b", "c", "d", "e", "blarr") :: Nil)
1556-
}
1557-
15581540
test("SPARK-14981: DESC not supported for sorting columns") {
15591541
withTable("t") {
15601542
val cause = intercept[ParseException] {

0 commit comments

Comments
 (0)