mbutrovich commented on code in PR #1103:
URL: https://github.com/apache/datafusion-comet/pull/1103#discussion_r1850995050
##########
spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala:
##########
@@ -2507,23 +2508,22 @@ object QueryPlanSerde extends Logging with
ShimQueryPlanSerde with CometExprShim
partitions.foreach(p => {
val inputPartitions =
p.asInstanceOf[DataSourceRDDPartition].inputPartitions
inputPartitions.foreach(partition => {
- partition2Proto(partition.asInstanceOf[FilePartition],
nativeScanBuilder)
+ partition2Proto(partition.asInstanceOf[FilePartition],
nativeScanBuilder, scan)
})
})
case rdd: FileScanRDD =>
rdd.filePartitions.foreach(partition => {
- partition2Proto(partition, nativeScanBuilder)
+ partition2Proto(partition, nativeScanBuilder, scan)
})
case _ =>
+ assert(false)
}
- val requiredSchemaParquet =
- new
SparkToParquetSchemaConverter(conf).convert(scan.requiredSchema)
- val dataSchemaParquet =
- new
SparkToParquetSchemaConverter(conf).convert(scan.relation.dataSchema)
+ val projection_vector: Array[java.lang.Long] =
scan.requiredSchema.fields.map(field => {
Review Comment:
My concern is that...
1. Java side parses Parquet metadata, generates a Spark schema
2. Java side converts Spark schema to Arrow schema (following Comet
conversion rules)
3. Serialize Arrow types, native side feeds this into ParquetExec as the
data schema
...may yield different results than:
1. Java side serializes original Parquet metadata
2. Serialize schema message
3. Native side parses message, generates Arrow schema and feeds this into
ParquetExec as the data schema
I guess I could exhaustively test this hypothesis with all types.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]