Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/21912#discussion_r214253006
--- Diff:
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeArrayData.java
---
@@ -452,6 +452,16 @@ public UnsafeArrayData copy() {
public static UnsafeArrayData fromPrimitiveArray(
Object arr, int offset, int length, int elementSize) {
+ UnsafeArrayData result = createFreshArray(length, elementSize);
+ final long headerInBytes = calculateHeaderPortionInBytes(length);
+ final long valueRegionInBytes = (long)elementSize * length;
+ final Object data = result.getBaseObject();
--- End diff --
now the data is `Object` instead of `long[]`. Can we duplicate the code for
now and think of how to deduplicate them later?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]