Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/13680#discussion_r69392598
--- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/GenerateUnsafeProjection.scala
---
@@ -189,29 +189,33 @@ object GenerateUnsafeProjection extends CodeGenerator[Seq[Expression],
UnsafePro
val jt = ctx.javaType(et)
- val fixedElementSize = et match {
+ val elementOrOffsetSize = et match {
case t: DecimalType if t.precision <= Decimal.MAX_LONG_DIGITS => 8
case _ if ctx.isPrimitiveType(jt) => et.defaultSize
- case _ => 0
+ case _ => 8 // we need 8 bytes to store offset and length for variable-length
types]
--- End diff --
remove the tailing `]`?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
|