@@ -822,7 +822,7 @@ case class Cast(child: Expression, dataType: DataType, timeZoneId: Option[String
822822 case ArrayType (et, _) =>
823823 (c, evPrim, evNull) => {
824824 val buffer = ctx.freshVariable(" buffer" , classOf [UTF8StringBuilder ])
825- val bufferClass = JavaCode .className (classOf [UTF8StringBuilder ])
825+ val bufferClass = JavaCode .javaType (classOf [UTF8StringBuilder ])
826826 val writeArrayElemCode = writeArrayToStringBuilder(et, c, buffer, ctx)
827827 code """
828828 | $bufferClass $buffer = new $bufferClass();
@@ -833,7 +833,7 @@ case class Cast(child: Expression, dataType: DataType, timeZoneId: Option[String
833833 case MapType (kt, vt, _) =>
834834 (c, evPrim, evNull) => {
835835 val buffer = ctx.freshVariable(" buffer" , classOf [UTF8StringBuilder ])
836- val bufferClass = JavaCode .className (classOf [UTF8StringBuilder ])
836+ val bufferClass = JavaCode .javaType (classOf [UTF8StringBuilder ])
837837 val writeMapElemCode = writeMapToStringBuilder(kt, vt, c, buffer, ctx)
838838 code """
839839 | $bufferClass $buffer = new $bufferClass();
@@ -845,7 +845,7 @@ case class Cast(child: Expression, dataType: DataType, timeZoneId: Option[String
845845 (c, evPrim, evNull) => {
846846 val row = ctx.freshVariable(" row" , classOf [InternalRow ])
847847 val buffer = ctx.freshVariable(" buffer" , classOf [UTF8StringBuilder ])
848- val bufferClass = JavaCode .className (classOf [UTF8StringBuilder ])
848+ val bufferClass = JavaCode .javaType (classOf [UTF8StringBuilder ])
849849 val writeStructCode = writeStructToStringBuilder(fields.map(_.dataType), row, buffer, ctx)
850850 code """
851851 |InternalRow $row = $c;
@@ -1204,7 +1204,7 @@ case class Cast(child: Expression, dataType: DataType, timeZoneId: Option[String
12041204 private [this ] def castArrayCode (
12051205 fromType : DataType , toType : DataType , ctx : CodegenContext ): CastFunction = {
12061206 val elementCast = nullSafeCastFunction(fromType, toType, ctx)
1207- val arrayClass = JavaCode .className (classOf [GenericArrayData ])
1207+ val arrayClass = JavaCode .javaType (classOf [GenericArrayData ])
12081208 val fromElementNull = ctx.freshVariable(" feNull" , BooleanType )
12091209 val fromElementPrim = ctx.freshVariable(" fePrim" , fromType)
12101210 val toElementNull = ctx.freshVariable(" teNull" , BooleanType )
@@ -1242,7 +1242,7 @@ case class Cast(child: Expression, dataType: DataType, timeZoneId: Option[String
12421242 val keysCast = castArrayCode(from.keyType, to.keyType, ctx)
12431243 val valuesCast = castArrayCode(from.valueType, to.valueType, ctx)
12441244
1245- val mapClass = JavaCode .className (classOf [ArrayBasedMapData ])
1245+ val mapClass = JavaCode .javaType (classOf [ArrayBasedMapData ])
12461246
12471247 val keys = ctx.freshVariable(" keys" , ArrayType (from.keyType))
12481248 val convertedKeys = ctx.freshVariable(" convertedKeys" , ArrayType (to.keyType))
@@ -1272,7 +1272,7 @@ case class Cast(child: Expression, dataType: DataType, timeZoneId: Option[String
12721272 case (fromField, toField) => nullSafeCastFunction(fromField.dataType, toField.dataType, ctx)
12731273 }
12741274 val tmpResult = ctx.freshVariable(" tmpResult" , classOf [GenericInternalRow ])
1275- val rowClass = JavaCode .className (classOf [GenericInternalRow ])
1275+ val rowClass = JavaCode .javaType (classOf [GenericInternalRow ])
12761276 val tmpInput = ctx.freshVariable(" tmpInput" , classOf [InternalRow ])
12771277
12781278 val fieldsEvalCode = fieldsCasts.zipWithIndex.map { case (cast, i) =>
0 commit comments