File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
mllib/src/main/scala/org/apache/spark/ml/stat
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -393,6 +393,7 @@ object SummaryBuilderImpl extends Logging {
393393 * Reads a buffer from a serialized form, using the row object as an assistant.
394394 */
395395 def read (bytes : Array [Byte ]): Buffer = {
396+ // TODO move this row outside to the aggregate
396397 assert(numFields == 12 , numFields)
397398 val row3 = new UnsafeRow (numFields)
398399 row3.pointTo(bytes.clone(), bytes.length)
Original file line number Diff line number Diff line change @@ -101,6 +101,8 @@ case class InterpretedMutableProjection(expressions: Seq[Expression]) extends Mu
101101
102102/**
103103 * A projection that returns UnsafeRow.
104+ *
105+ * CAUTION: the returned projection object should *not* be assumed to be thread-safe.
104106 */
105107abstract class UnsafeProjection extends Projection {
106108 override def apply (row : InternalRow ): UnsafeRow
@@ -110,11 +112,15 @@ object UnsafeProjection {
110112
111113 /**
112114 * Returns an UnsafeProjection for given StructType.
115+ *
116+ * CAUTION: the returned projection object is *not* thread-safe.
113117 */
114118 def create (schema : StructType ): UnsafeProjection = create(schema.fields.map(_.dataType))
115119
116120 /**
117121 * Returns an UnsafeProjection for given Array of DataTypes.
122+ *
123+ * CAUTION: the returned projection object is *not* thread-safe.
118124 */
119125 def create (fields : Array [DataType ]): UnsafeProjection = {
120126 create(fields.zipWithIndex.map(x => BoundReference (x._2, x._1, true )))
You can’t perform that action at this time.
0 commit comments