Skip to content

Commit

Permalink
fix legacy format support batch read
Browse files Browse the repository at this point in the history
  • Loading branch information
stream2000 committed Dec 14, 2023
1 parent e1423a8 commit acf2f8f
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@ class LegacyHoodieParquetFileFormat extends ParquetFileFormat with SparkAdapterS
override def toString: String = "Hoodie-Parquet"

override def supportBatch(sparkSession: SparkSession, schema: StructType): Boolean = {
if (HoodieSparkUtils.gteqSpark3_4) {
val conf = sparkSession.sessionState.conf
conf.parquetVectorizedReaderEnabled && schema.forall(_.dataType.isInstanceOf[AtomicType])
} else {
super.supportBatch(sparkSession, schema)
}
sparkAdapter
.createLegacyHoodieParquetFileFormat(true).get.supportBatch(sparkSession, schema)
}

override def buildReaderWithPartitionValues(sparkSession: SparkSession,
Expand Down

0 comments on commit acf2f8f

Please sign in to comment.