Skip to content

Commit 4e37c80

Browse files
author
Marcelo Vanzin
committed
Feedback.
1 parent b451a70 commit 4e37c80

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ case class LoadDataCommand(
203203
throw new AnalysisException(s"LOAD DATA target table $tableIdentwithDB is partitioned, " +
204204
s"but number of columns in provided partition spec (${partition.get.size}) " +
205205
s"do not match number of partitioned columns in table " +
206-
s"(s${targetTable.partitionColumnNames.size})")
206+
s"(${targetTable.partitionColumnNames.size})")
207207
}
208208
partition.get.keys.foreach { colName =>
209209
if (!targetTable.partitionColumnNames.contains(colName)) {

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ class HiveCommandSuite extends QueryTest with SQLTestUtils with TestHiveSingleto
166166
}
167167

168168
private def testLoadData(loadQuery: String, local: Boolean): Unit = {
169+
// employee.dat has two columns separated by '|', the first is an int, the second is a string.
170+
// Its content looks like:
171+
// 16|john
172+
// 17|robert
169173
val testData = hiveContext.getHiveFile("data/files/employee.dat").getCanonicalFile()
170174

171175
/**
@@ -196,11 +200,6 @@ class HiveCommandSuite extends QueryTest with SQLTestUtils with TestHiveSingleto
196200
|LINES TERMINATED BY '\n'
197201
""".stripMargin)
198202

199-
// employee.dat has two columns separated by '|', the first is an int, the second is a string.
200-
// Its content looks like:
201-
// 16|john
202-
// 17|robert
203-
204203
// LOAD DATA INTO non-partitioned table can't specify partition
205204
intercept[AnalysisException] {
206205
sql(s"""$loadQuery INPATH "$testData" INTO TABLE non_part_table PARTITION(ds="1")""")

0 commit comments

Comments
 (0)