Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/7689#discussion_r35509386
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateUnsafeProjection.scala
---
@@ -33,14 +33,111 @@ object GenerateUnsafeProjection extends
CodeGenerator[Seq[Expression], UnsafePro
private val StringWriter =
classOf[UnsafeRowWriters.UTF8StringWriter].getName
private val BinaryWriter = classOf[UnsafeRowWriters.BinaryWriter].getName
+ private val StructWriter = classOf[UnsafeRowWriters.StructWriter].getName
/** Returns true iff we support this data type. */
def canSupport(dataType: DataType): Boolean = dataType match {
case t: AtomicType if !t.isInstanceOf[DecimalType] => true
+ case t: StructType => t.toSeq.forall(field =>
canSupport(field.dataType))
case NullType => true
case _ => false
}
+ private def createCodeForStruct(
--- End diff --
there is a lot of code duplication between this one and createCode.
---
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]