Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22814#discussion_r228164819
  
    --- Diff: 
external/avro/src/test/scala/org/apache/spark/sql/avro/AvroCatalystDataConversionSuite.scala
 ---
    @@ -167,4 +184,26 @@ class AvroCatalystDataConversionSuite extends 
SparkFunSuite with ExpressionEvalH
         // avro reader reads the first 4 bytes of a double as a float, the 
result is totally undefined.
         checkResult(data, avroTypeJson, 5.848603E35f)
       }
    +
    +  test("Handle unsupported input of record type") {
    +    val actualSchema = StructType(Seq(
    +      StructField("col_0", StringType, false),
    +      StructField("col_1", ShortType, false),
    +      StructField("col_2", DecimalType(8, 4), false),
    +      StructField("col_3", BooleanType, true),
    +      StructField("col_4", DecimalType(38, 38), false)))
    +
    +    val expectedSchema = StructType(Seq(
    +      StructField("col_0", BinaryType, false),
    +      StructField("col_1", DoubleType, false),
    +      StructField("col_2", DecimalType(18, 4), false),
    +      StructField("col_3", StringType, true),
    +      StructField("col_4", DecimalType(38, 38), false)))
    +
    +    val data = RandomDataGenerator.randomRow(new scala.util.Random, 
actualSchema)
    --- End diff --
    
    let's include the seed with `withClue`, so that people can reproduce test 
failures


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to