Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ object QueryPlanSerde extends Logging with CometExprShim {
CometConf.COMET_RESPECT_PARQUET_FILTER_PUSHDOWN.get(conf)) {

val dataFilters = new ListBuffer[Expr]()
for (filter <- scan.dataFilters) {
for (filter <- scan.supportedDataFilters) {
exprToProto(filter, scan.output) match {
case Some(proto) => dataFilters += proto
case _ =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,21 @@ case class CometScanExec(
}
}

@transient
private lazy val pushedDownFilters = {
val supportedFilters = if (scanImpl == CometConf.SCAN_NATIVE_DATAFUSION) {
// `native_datafusion` scan does not support subquery pushdown filters,
// see: https://github.com/apache/datafusion-comet/issues/2424
/**
* Returns the data filters that are supported for this scan implementation. For
* native_datafusion scans, this excludes dynamic pruning filters (subqueries)
*/
lazy val supportedDataFilters: Seq[Expression] = {
if (scanImpl == CometConf.SCAN_NATIVE_DATAFUSION) {
dataFilters.filterNot(isDynamicPruningFilter)
} else {
dataFilters
}
getPushedDownFilters(relation, supportedFilters)
}

@transient
private lazy val pushedDownFilters = {
getPushedDownFilters(relation, supportedDataFilters)
}

override lazy val metadata: Map[String, String] =
Expand Down
Loading