File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
main/scala/org/apache/spark/sql/hive
test/scala/org/apache/spark/sql/hive/execution Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,8 @@ private[hive] class HiveMetastoreCatalog(hive: HiveContext) extends Catalog with
142142 val childOutputDataTypes = child.output.map(_.dataType)
143143 // Only check attributes, not partitionKeys since they are always strings.
144144 // TODO: Fully support inserting into partitioned tables.
145- val tableOutputDataTypes = table.attributes.map(_.dataType)
145+ val tableOutputDataTypes =
146+ table.attributes.map(_.dataType) ++ table.partitionKeys.map(_.dataType)
146147
147148 if (childOutputDataTypes == tableOutputDataTypes) {
148149 p
Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ class HiveQuerySuite extends HiveComparisonTest {
167167
168168 createQueryTest(" Cast Timestamp to Timestamp in UDF" ,
169169 """
170- | SELECT DATEDIFF(CAST(value AS timestamp), CAST('2002-03-21 00:00:00' AS timestamp))
170+ | SELECT DATEDIFF(CAST(value AS timestamp), CAST('2002-03-21 00:00:00' AS timestamp))
171171 | FROM src LIMIT 1
172172 """ .stripMargin)
173173
You can’t perform that action at this time.
0 commit comments