Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,8 @@ class RowEncoderSuite extends SparkFunSuite {
.add("structOfMap", new StructType().add("map", mapOfString))
.add("structOfArrayAndMap",
new StructType().add("array", arrayOfString).add("map", mapOfString))
.add("structOfUDT", structOfUDT))

test(s"encode/decode: arrayOfUDT") {
val schema = new StructType()
.add("arrayOfUDT", arrayOfUDT)

val encoder = RowEncoder(schema)

val input: Row = Row(Seq(new ExamplePoint(0.1, 0.2), new ExamplePoint(0.3, 0.4)))
val row = encoder.toRow(input)
val convertedBack = encoder.fromRow(row)
assert(input.getSeq[ExamplePoint](0) == convertedBack.getSeq[ExamplePoint](0))
}
.add("structOfUDT", structOfUDT)
.add("arrayOfUDT", arrayOfUDT))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move it to the array section? i.e. the encodeDecodeTest that has a lot of arrayOfxxx

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. it is more proper.


test(s"encode/decode: Product") {
val schema = new StructType()
Expand Down