szehon-ho commented on code in PR #56031:
URL: https://github.com/apache/spark/pull/56031#discussion_r3283092280
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2ScanRelationPushDown.scala:
##########
@@ -151,11 +151,14 @@ object V2ScanRelationPushDown extends Rule[LogicalPlan]
with PredicateHelper {
rightProjections.forall(_.isInstanceOf[AttributeReference]) &&
// Cross joins are not supported because they increase the amount of
data.
condition.isDefined &&
- // Do not push down join if either side has a pushed sample, because
- // the merged scan builder would silently discard it.
+ // Do not push down join if either side has a pushed sample with
+ // fraction < 1, because the merged scan builder would silently
+ // discard it and change the result. At fraction = 1 the sample is
+ // a no-op on the result set, so dropping it is safe.
// TODO(SPARK-56504): Extend SupportsPushDownJoin to accept pushed
Review Comment:
looks like this is @stanyao 's todo JIRA, can we make this pr target that
and remove the TODO?
--
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]