stanyao commented on code in PR #54972:
URL: https://github.com/apache/spark/pull/54972#discussion_r3221575712


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala:
##########
@@ -1039,7 +1039,16 @@ abstract class SparkStrategies extends 
QueryPlanner[SparkPlan] {
         execution.FilterExec(f.typedCondition(f.deserializer), 
planLater(f.child)) :: Nil
       case e @ logical.Expand(_, _, child) =>
         execution.ExpandExec(e.projections, e.output, planLater(child)) :: Nil
-      case logical.Sample(lb, ub, withReplacement, seed, child) =>
+      case logical.Sample(lb, ub, withReplacement, seed, child, sampleMethod) 
=>
+        if (sampleMethod == logical.SampleMethod.System) {

Review Comment:
   Very good point. Yeah, SYSTEM sample nodes should have been fully handled by 
V2ScanRelationPushDown (including throwing AnalysisException for user error 
like doing system sampling on DSV1 source); reaching this point indicates an 
internal error. Fixed both the error type and comment, while still keeping this 
defensive check.



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