Skip to content

Commit 61ec88b

Browse files
committed
test: write an unsafe array of each primitive type
Each of the twelve vector types whose unsafe array elements are copied in one block now reaches that copy, at every element width. Only int and long arrays did before.
1 parent b441fe5 commit 61ec88b

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎spark/src/test/scala/org/apache/spark/sql/comet/execution/arrow/CometArrowWriterSuite.scala‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -686,12 +686,10 @@ class CometArrowWriterSuite extends AnyFunSuite with Matchers {
686686
}
687687
}
688688

689-
// Nested shapes whose unsafe forms take paths of their own: elements converted one at a time,
690-
// collections inside collections, and a struct wider than one word of null bits.
691-
private val moreNestedTypes: Seq[DataType] = Seq(
692-
ArrayType(BooleanType),
693-
ArrayType(DecimalType(38, 10)),
694-
ArrayType(BinaryType),
689+
// Nested shapes whose unsafe forms take paths of their own: an array of each primitive type,
690+
// whose elements are either copied in one block or converted one at a time, collections inside
691+
// collections, and a struct wider than one word of null bits.
692+
private val moreNestedTypes: Seq[DataType] = primitiveTypes.map(ArrayType(_)) ++ Seq(
695693
ArrayType(MapType(StringType, IntegerType)),
696694
MapType(StringType, ArrayType(StringType)),
697695
MapType(LongType, DecimalType(9, 2)),

0 commit comments

Comments
 (0)