Skip to content

Commit

Permalink
use infix notion in createArray test
Browse files Browse the repository at this point in the history
  • Loading branch information
yjshen committed Jul 22, 2015
1 parent 5e90f0a commit 3a6dce6
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ class ComplexTypeSuite extends SparkFunSuite with ExpressionEvalHelper {
checkEvaluation(CreateArray(longSeq.map(Literal(_))), longSeq, EmptyRow)
checkEvaluation(CreateArray(strSeq.map(Literal(_))), strSeq, EmptyRow)

val intWithNull = intSeq.map(Literal(_)).+:(Literal.create(null, IntegerType))
val longWithNull = longSeq.map(Literal(_)).+:(Literal.create(null, LongType))
val strWithNull = strSeq.map(Literal(_)).+:(Literal.create(null, StringType))
checkEvaluation(CreateArray(intWithNull), intSeq.+:(null), EmptyRow)
checkEvaluation(CreateArray(longWithNull), longSeq.+:(null), EmptyRow)
checkEvaluation(CreateArray(strWithNull), strSeq.+:(null), EmptyRow)
val intWithNull = intSeq.map(Literal(_)) :+ Literal.create(null, IntegerType)
val longWithNull = longSeq.map(Literal(_)) :+ Literal.create(null, LongType)
val strWithNull = strSeq.map(Literal(_)) :+ Literal.create(null, StringType)
checkEvaluation(CreateArray(intWithNull), intSeq :+ null, EmptyRow)
checkEvaluation(CreateArray(longWithNull), longSeq :+ null, EmptyRow)
checkEvaluation(CreateArray(strWithNull), strSeq :+ null, EmptyRow)
}

test("CreateStruct") {
Expand Down

0 comments on commit 3a6dce6

Please sign in to comment.