jonvex commented on code in PR #13503:
URL: https://github.com/apache/hudi/pull/13503#discussion_r2238008163
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/FileFormatUtilsForFileGroupReader.scala:
##########
@@ -124,4 +124,11 @@ object FileFormatUtilsForFileGroupReader extends
SparkAdapterSupport {
plan
}
}
+
+ def createStreamingDataFrame(sqlContext: SQLContext, relation:
HadoopFsRelation, requiredSchema: StructType): DataFrame = {
+ val logRel = LogicalRelation(relation, isStreaming = true)
+ val resolvedSchema = logRel.resolve(requiredSchema,
sqlContext.sparkSession.sessionState.analyzer.resolver)
+ Dataset.ofRows(sqlContext.sparkSession, applyFiltersToPlan(logRel,
requiredSchema, resolvedSchema,
+ relation.fileFormat.asInstanceOf[HoodieFormatTrait].getRequiredFilters))
Review Comment:
I don't know of a way.
```
case class HadoopFsRelation(
location: FileIndex,
partitionSchema: StructType,
// The top-level columns in `dataSchema` should match the actual
physical file schema, otherwise
// the ORC data source may not work with the by-ordinal mode.
dataSchema: StructType,
bucketSpec: Option[BucketSpec],
fileFormat: FileFormat,
options: Map[String, String])(val sparkSession: SparkSession)
```
It's not really post processing though, because it still happens in the
analysis stage.
https://github.com/apache/hudi/pull/10225
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]