File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
core/src/main/scala/org/apache/spark/sql/execution/command
hive/src/test/scala/org/apache/spark/sql/hive/execution Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff 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)) {
Original file line number Diff line number Diff 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") """ )
You can’t perform that action at this time.
0 commit comments