664a1719de
### What changes were proposed in this pull request? This pr fix all 14 failed cases in `external/avro` module in Scala 2.13, the main change of this pr as follow: - Manual call `toSeq` in `AvroDeserializer#newWriter` and `SchemaConverters#toSqlTypeHelper` method because the object type for case match is `ArrayBuffer` not `Seq` in Scala 2.13 - Specified `Seq` to `s.c.Seq` when we call `Row.get(i).asInstanceOf[Seq]` because the data maybe `mutable.ArraySeq` but `Seq` is `immutable.Seq` in Scala 2.13 ### Why are the changes needed? We need to support a Scala 2.13 build. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - Scala 2.12: Pass the Jenkins or GitHub Action - Scala 2.13: Pass 2.13 Build GitHub Action and do the following: ``` dev/change-scala-version.sh 2.13 mvn clean install -DskipTests -pl external/avro -Pscala-2.13 -am mvn clean test -pl external/avro -Pscala-2.13 ``` **Before** ``` Tests: succeeded 197, failed 14, canceled 0, ignored 2, pending 0 *** 14 TESTS FAILED *** ``` **After** ``` Tests: succeeded 211, failed 0, canceled 0, ignored 2, pending 0 All tests passed. ``` Closes #29801 from LuciferYang/fix-external-avro-213. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: HyukjinKwon <gurwls223@apache.org> |
||
---|---|---|
.. | ||
avro | ||
docker | ||
docker-integration-tests | ||
kafka-0-10 | ||
kafka-0-10-assembly | ||
kafka-0-10-sql | ||
kafka-0-10-token-provider | ||
kinesis-asl | ||
kinesis-asl-assembly | ||
spark-ganglia-lgpl |