mbutrovich commented on code in PR #1103:
URL: https://github.com/apache/datafusion-comet/pull/1103#discussion_r1850297863


##########
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:
   The `SchemaConverter` seems like it could be handled in DF's 
`SchemaAdapter`. I'll look at `clipParquetSchema` as well, thanks!



-- 
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]

Reply via email to