Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7752#discussion_r36039963
  
    --- Diff: 
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeArrayData.java
 ---
    @@ -0,0 +1,354 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.sql.catalyst.expressions;
    +
    +import java.math.BigDecimal;
    +import java.math.BigInteger;
    +
    +import org.apache.spark.sql.catalyst.InternalRow;
    +import org.apache.spark.sql.types.*;
    +import org.apache.spark.unsafe.PlatformDependent;
    +import org.apache.spark.unsafe.array.ByteArrayMethods;
    +import org.apache.spark.unsafe.hash.Murmur3_x86_32;
    +import org.apache.spark.unsafe.types.CalendarInterval;
    +import org.apache.spark.unsafe.types.UTF8String;
    +
    +/**
    + * An Unsafe implementation of Array which is backed by raw memory instead 
of Java objects.
    + *
    + * Each tuple has two parts: [offsets] [values]
    + *
    + * In the `offsets` region, we store 4 bytes per element, represents the 
start address of this
    + * element in `values` region. We can get the length of this element by 
subtracting next offset.
    + * Note that offset can by negative which means this element is null.
    + *
    + * In ghe `values` region, we store the content of elements. As we can get 
length info, so elements
    + * can be variable-length.
    + *
    + * Note that when we write out this array, we should write out the 
`numElements` at first 4 bytes,
    + * then follows content. When we read in an array, we should read first 4 
bytes as `numElements`
    + * and take the rest as content.
    + *
    + * Instances of `UnsafeArrayData` act as pointers to row data stored in 
this format.
    + */
    +// todo: there is a lof of duplicated code between UnsafeRow and 
UnsafeArrayData.
    --- End diff --
    
    He's already done with it hasn't he?


---
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]

Reply via email to