andygrove commented on code in PR #7508:
URL: https://github.com/apache/datafusion-comet/pull/7508#discussion_r4605755106
##########
spark/src/main/scala/org/apache/spark/sql/comet/CometScanUtils.scala:
##########
@@ -33,6 +33,21 @@ import org.apache.comet.objectstore.NativeConfig
object CometScanUtils {
+ private[apache] def copyScanWithFilters(
+ scan: FileSourceScanExec,
+ partitionFilters: Seq[Expression],
+ dataFilters: Seq[Expression]): FileSourceScanExec = {
+ // Keep the runtime's full constructor, including fields added by Spark
distributions.
+ val args = scan.productIterator.map(_.asInstanceOf[AnyRef]).toArray
+ // Spark 4 adds a stream argument before the schema; the filters keep the
same offsets
+ // after it. Locate the existing schema rather than assuming a
Spark-specific arity.
Review Comment:
We should probably have handled this in the shim layer
--
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]