Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/18483#discussion_r124978492
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateSafeProjection.scala
---
@@ -131,8 +131,6 @@ object GenerateSafeProjection extends
CodeGenerator[Seq[Expression], Projection]
case s: StructType => createCodeForStruct(ctx, input, s)
case ArrayType(elementType, _) => createCodeForArray(ctx, input,
elementType)
case MapType(keyType, valueType, _) => createCodeForMap(ctx, input,
keyType, valueType)
- // UTF8String act as a pointer if it's inside UnsafeRow, so copy it to
make it safe.
- case StringType => ExprCode("", "false", s"$input.clone()")
--- End diff --
this copy is not needed, as we will do copy before we updating a value to
the row.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]