Skip to content

Commit d725fc9

Browse files
committed
update
1 parent 182449b commit d725fc9

File tree

2 files changed

+2
-1
lines changed
  • sql
    • catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions
    • core/src/main/scala/org/apache/spark/sql/execution/command

2 files changed

+2
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/literals.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ object Literal {
5757
case b: Byte => Literal(b, ByteType)
5858
case s: Short => Literal(s, ShortType)
5959
case s: String => Literal(UTF8String.fromString(s), StringType)
60+
case s: UTF8String => Literal(s, StringType)
6061
case b: Boolean => Literal(b, BooleanType)
6162
case d: BigDecimal => Literal(Decimal(d), DecimalType(Math.max(d.precision, d.scale), d.scale))
6263
case d: JavaBigDecimal =>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ case class AlterTableDropPartitionCommand(
548548
}
549549
val dataType = table.partitionSchema.apply(attrName).dataType
550550
expr.withNewChildren(Seq(AttributeReference(attrName, dataType)(),
551-
Cast(Literal(value.toString), dataType)))
551+
Cast(Literal(value), dataType)))
552552
}.reduce(And)
553553

554554
val partitions = catalog.listPartitionsByFilter(

0 commit comments

Comments
 (0)