Skip to content

Commit

Permalink
add nulls to generateBytes
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Apr 30, 2024
1 parent 20e4f05 commit 82d5a53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spark/src/test/scala/org/apache/comet/CometCastSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ class CometCastSuite extends CometTestBase with AdaptiveSparkPlanHelper {
val r = new Random(0)
val values = Seq(Byte.MinValue, Byte.MaxValue) ++
Range(0, dataSize).map(_ => r.nextInt().toByte)
values.toDF("a")
withNulls(values).toDF("a")
}

private def generateShorts(): DataFrame = {
Expand Down Expand Up @@ -647,7 +647,7 @@ class CometCastSuite extends CometTestBase with AdaptiveSparkPlanHelper {
Range(0, len).map(_ => chars.charAt(r.nextInt(chars.length))).mkString
}

// TODO return DataFrame for consistency with other generators
// TODO return DataFrame for consistency with other generators and include null values
private def generateStrings(chars: String, maxLen: Int): Seq[String] = {
val r = new Random(0)
Range(0, dataSize).map(_ => generateString(r, chars, maxLen))
Expand Down

0 comments on commit 82d5a53

Please sign in to comment.