You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by si...@apache.org on 2022/04/22 00:36:58 UTC

[hudi] 11/15: fix tail misuse

This is an automated email from the ASF dual-hosted git repository.

sivabalan pushed a commit to branch release-0.11-0-apr21-5378-patched
in repository https://gitbox.apache.org/repos/asf/hudi.git

commit 1dfab33b7a53b0e02690dd45320d2bb86980003a
Author: Raymond Xu <27...@users.noreply.github.com>
AuthorDate: Thu Apr 21 21:36:04 2022 +0800

    fix tail misuse
---
 .../execution/datasources/parquet/Spark32HoodieParquetFileFormat.scala  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hudi-spark-datasource/hudi-spark3/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/Spark32HoodieParquetFileFormat.scala b/hudi-spark-datasource/hudi-spark3/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/Spark32HoodieParquetFileFormat.scala
index 5d9d2a737d..3ba5d38623 100644
--- a/hudi-spark-datasource/hudi-spark3/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/Spark32HoodieParquetFileFormat.scala
+++ b/hudi-spark-datasource/hudi-spark3/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/Spark32HoodieParquetFileFormat.scala
@@ -416,7 +416,7 @@ object Spark32HoodieParquetFileFormat {
     //       up by arg types, and have to instead rely on relative order of ctors
     // NOTE: VectorizedParquetRecordReader has 2 ctors and the one we need is 2nd on the array
     //       This is a hacky workaround for the fixed version of Class.
-    val ctor = classOf[VectorizedParquetRecordReader].getConstructors.tail
+    val ctor = classOf[VectorizedParquetRecordReader].getConstructors.last
     ctor.newInstance(args.map(_.asInstanceOf[AnyRef]): _*)
       .asInstanceOf[VectorizedParquetRecordReader]
   }