You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/01/04 17:17:44 UTC
[GitHub] [spark] dongjoon-hyun commented on a change in pull request #35038: [SPARK-37728][SQL][3.2] Reading nested columns with ORC vectorized reader can cause ArrayIndexOutOfBoundsException
dongjoon-hyun commented on a change in pull request #35038:
URL: https://github.com/apache/spark/pull/35038#discussion_r778253991
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/orc/OrcQuerySuite.scala
##########
@@ -713,6 +715,27 @@ abstract class OrcQuerySuite extends OrcQueryTest with SharedSparkSession {
}
}
}
+
+ test("SPARK-37728: Reading nested columns with ORC vectorized reader should not " +
+ "cause ArrayIndexOutOfBoundsException") {
+ withTempPath { dir =>
+ val path = dir.getCanonicalPath
+ val df = spark.range(100).map { _ =>
+ val arrayColumn = (0 until 50).map(_ => (0 until 1000).map(k => k.toString))
+ arrayColumn
+ }.toDF("record").repartition(1)
+ df.write.format("orc").save(path)
+
+ withSQLConf(SQLConf.ORC_VECTORIZED_READER_NESTED_COLUMN_ENABLED.key -> "true") {
+ val readDf = spark.read.orc(path)
+ val vectorizationEnabled = readDf.queryExecution.executedPlan.find {
+ case scan @ (_: FileSourceScanExec | _: BatchScanExec) => scan.supportsColumnar
+ case _ => false
+ }.isDefined
Review comment:
Got it. Thank you for the background, @yym1995 .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org