Github user liancheng commented on a diff in the pull request: https://github.com/apache/spark/pull/14304#discussion_r71902498 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetEncodingSuite.scala --- @@ -78,4 +78,30 @@ class ParquetEncodingSuite extends ParquetCompatibilityTest with SharedSQLContex }} } } + + test("Read row group containing both dictionary and plain encoded pages") { + spark.conf.set("parquet.dictionary.page.size", "2048") + spark.conf.set("parquet.page.size", "4096") + + withTempPath { dir => + // In order to explicitly test for SPARK-14217, we set the parquet dictionary and page size + // such that the following data spans across 3 pages (within a single row group) where the + // first page is dictionary encoded and the remaining two are plain encoded. + val data = (0 until 512).flatMap(i => Seq.fill(3)(i.toString)) + data.toDF("f").coalesce(1).write.parquet(dir.getCanonicalPath) + val file = + SpecificParquetRecordReaderBase.listDirectory(dir).toArray.head.asInstanceOf[String] --- End diff -- We can use `JavaConverters` here: ```scala import scala.collection.JavaConverters._ val file = SpecificParquetRecordReaderBase.listDirectory(dir).asScala.head ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org